CVE-2026-99637: ovl: inherit FMODE_NONOTIFY when opening directory realfiles
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ovl: inherit FMODE_NONOTIFY when opening directory realfiles
When fanotify hands a listener an fd for a permission event on an overlay directory, ovl_dir_open_realfile() opens the real directory via dentry_open(), not backing_file_open(), so the lower open could still raise FS_OPEN_PERM and deadlock a listener that also marks the backing filesystem.
Export dentry_open_nonotify() and call it from ovl_path_open_realfile() when the overlay user file must not generate events. Ordinary ovl_path_open() callers are unchanged.
The Linux kernel CVE team has assigned CVE-2026-99637 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.8 with commit 130fdbc3d1f9966dd4230709c30f3768bccd3065 and fixed in 7.3.5 with commit c3ccfbb2acb259b5d3d030fdb63d3cf96de33330 Issue introduced in 5.8 with commit 130fdbc3d1f9966dd4230709c30f3768bccd3065 and fixed in 7.4-rc2 with commit 323899b4ed233d5b6e2fc160c16fbf39cf0317da
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-99637
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
fs/open.c
fs/overlayfs/overlayfs.h
fs/overlayfs/readdir.c
fs/overlayfs/util.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/c3ccfbb2acb259b5d3d030fdb63d3cf96de33330 https://git.kernel.org/stable/c/323899b4ed233d5b6e2fc160c16fbf39cf0317da