PT-2026-162791
CVE-2026-99824
·
Published
2026-11-30
·
Updated
2026-11-30
Description by
Score
N/A
Not availableNo severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.
In the Linux kernel, the following vulnerability has been resolved:
fs: let backing files inherit FMODE NONOTIFY from the user file
When fanotify reports a permission event, copy event to user() creates
the event fd with dentry open nonotify(), so that the listener's use of
that fd does not generate further events. If the event's path is on a
stacked filesystem, the stacked filesystem's ->open() opens the real
file with backing file open(). Since commit ebe559609d78 ("fs: get rid
of FMODE NONOTIFY kludge"), FMODE NONOTIFY lives in f mode only and
the backing file does not inherit it: it is allocated with the default
fsnotify mode, and fsnotify open perm and set mode() raises FS OPEN PERM
on the real path if the backing filesystem has permission event
watchers.
Before that commit FMODE NONOTIFY travelled in f flags, and overlayfs
copies the user file's f flags into the backing open
(ovl open realfile()), so the backing file was exempt implicitly. Commit
bc2473c90fca ("ovl: enable fsnotify events on underlying real files")
relied on that when it dropped FMODE NONOTIFY from OVL OPEN FLAGS.
The nested event is queued to the same group, from inside the
listener's read(2), and can only be answered by another reader thread
of that group. A listener holding filesystem marks on both the stacked
and the backing filesystem therefore deadlocks as soon as all of its
reader threads are inside such a read(2) at the same time, and every
other task that touches a marked filesystem queues up behind it.
Observed with a commercial anti-malware agent (16 reader threads) on an
ostree/composefs host: / is an overlayfs whose data layer is the ostree
object store on the same btrfs that holds /etc and /home, and a
systemd-sysext overlay sits on /usr. Every on-demand scan of /usr wedged
the whole machine until the group was killed. Stack of a blocked reader
thread on 7.2.7:
fanotify get response
fanotify handle event
send to group
fsnotify
fsnotify parent
do dentry open
vfs open
backing file open
ovl open realfile [overlay]
ovl open [overlay]
do dentry open
vfs open
backing file open
ovl open realfile [overlay]
ovl open [overlay]
do dentry open
vfs open
dentry open nonotify
copy event to user
fanotify read
vfs read
ksys read
Userspace cannot avoid this: the backing open happens while the kernel
builds the fd, before the event is reported, and fid reporting is not
available for permission event classes.
Make a backing file inherit FMODE NONOTIFY when the user file it is
opened for must not generate events. This restores the pre-6.14
behaviour for the fds that fanotify creates (and for any other
FMODE NONOTIFY file), while ordinary opens through a stacked filesystem
keep generating events on the real path, as intended by bc2473c90fca.
Verified with a self-contained reproducer (private tmpfs lower layers, an
overlayfs over them, FAN OPEN PERM filesystem marks on the overlay and on
one lower layer, a child opening a file through the overlay) in a qemu
VM on this tree built with defconfig plus OVERLAY FS, FANOTIFY and
FANOTIFY ACCESS PERMISSIONS: without this patch the listener's read(2)
never returns and the child's open is released only by the listener's
death; with it read(2) returns, the event is answered and the open
completes.
backing tmpfile open() is left alone: its only caller is
ovl create tmpfile(), whose user file is a regular overlayfs file.
Found an issue in the description? Have something to add? Feel free to write us 👾