CVE-2026-139678: kernfs: don't hold kernfs_rwsem across notification delivery

Published Nov 30, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

kernfs: don't hold kernfsrwsem across notification delivery

Recently at Meta we noticed that on multi-tenant systems, a workload under extreme memory pressure negatively impacts unrelated workloads and system daemons like below [1] and fb-oomd [2]. Mainly we observed that system daemons were stuck on kernfsrwsem in cgroup-related interfaces for long periods of time.

On further inspection, we found that the workload under pressure had registered inotify watches on its memory.events and was continuously receiving limit-hitting notifications. The cgroup notification is done in kernfsnotifyworkfn(), which holds kernfssupersrwsem and kernfsrwsem and calls fsnotify(), which allocates the event with kmalloc(GFPKERNELACCOUNT|GFPRETRYMAYFAIL) charged to the watching cgroup, which is already under memory pressure. So the notify worker ended up in memory reclaim of a cgroup already under pressure, and itself kept triggering the limit notifications.

This notification path takes the locks in read mode, but a waiting writer blocks all future readers. That is exactly what is happening in the Meta fleet, and it leaves daemons that are critical to the reliability of the system stuck for long periods of time.

Commit 400188ae361a ("kernfs: Acquire kernfsrwsem in kernfsnotifyworkfn().") added kernfsrwsem just to safely read kernfsnode::name. Let's sample the name once before the loop and drop the lock. kernfssupersrwsem still covers the list, and the removal paths take that one for reading too, so a stalled worker can still hold a removal up once a mount or unmount is queued behind it.

Two things change for a watcher. A name longer than NAMEMAX now gives an event with no name, where before it gave one with the full name; fsnotify() takes the name as optional, so the event still arrives. And the name and the parent are no longer sampled under one lock, so a rename between the two would name a file against the directory it moved to. That cannot happen today: kernfsnotify() rejects anything that is not a file, and no caller of kernfsrenamens() renames one.

[1] https://github.com/facebookincubator/below [2] https://github.com/facebookincubator/oomd

Affected Software

5 affected componentsFixes available
Linux Linux kernel
linux/kernel>=6.15.0<6.18.65
6.18.65
linux/kernel>=6.19.0<7.3.6
7.3.6
debian/linux<7.3.6-1
7.3.6-1
debian/linux
7.3.6-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.65
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.6
  3. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 7.3.6-1

Event History

Nov 30, 2026
CVE Published
via MITRE·01:36 PM
Data Sourced
via MITRE·01:36 PM
Description
Data Sourced
via OSV·01:36 PM
DescriptionAffected Software
Data Sourced
via NVD·02:19 PM
Description

Frequently Asked Questions

1

Which systems are most likely to experience this issue?

Multi-tenant systems are the described affected environment. Exposure arises when a workload is under extreme memory pressure and has inotify watches registered on its cgroup memory.events file.

2

What conditions trigger the prolonged blocking?

The affected workload must continuously receive memory limit-hit notifications while its watching cgroup is already under memory pressure. Notification-event allocation can then enter reclaim in that pressured cgroup while kernfs locks are held.

3

How can administrators recognize an affected system?

System daemons or unrelated workloads may be stuck for long periods on kernfs_rwsem while accessing cgroup-related interfaces. The reported scenario also involves a memory-pressured workload continuously generating notifications for memory.events.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203