CVE-2025-40237: Linux kernel inotify/OverlayFS unmount race causing NULL pointer dereference
CVE-2025-40237 is a race condition in Linux kernel filesystem notification handling. Reading inotify file-descriptor information for a watch on an OverlayFS inode can race with unmounting the corresponding filesystem. During generic_shutdown_super(), the superblock root pointer is cleared before filesystem notification marks are removed. Concurrently, inotify_show_fdinfo() can obtain the watched inode and invoke show_mark_fhandle(), which calls exportfs_encode_fid() without holding the s_umount lock. The OverlayFS file-handle encoding path subsequently reaches ovl_check_encode_origin() and dereferences the cleared inode->i_sb->s_root pointer, triggering a kernel NULL pointer dereference. The vulnerability can cause a local denial of service.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
A local attacker with low privileges may trigger a kernel fault and potentially crash the system, causing high availability impact. SUSE rates the vulnerability Moderate with CVSS 3.1 score 5.5 (AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H). No confidentiality or integrity impact is established.
Mitigation
If you can’t patch tonight, do this now.
No specific vendor workaround is documented. Until the kernel can be updated, limit untrusted local access and avoid concurrent inotify descriptor-information reads and unmount operations involving watched OverlayFS inodes. These measures reduce exposure but are not a substitute for the kernel fix.
Remediation
Patch, then assume compromise.
Install the distribution's kernel update addressing CVE-2025-40237 and reboot into the updated kernel. The code fix protects the exportfs_encode_fid() call in show_mark_fhandle() with the superblock s_umount lock to serialize file-handle encoding against unmount. SUSE lists fixed kernel packages at version 6.12.0-160000.9.1 for applicable products. Red Hat Enterprise Linux 10.0 Extended Update Support lists fixed packages at 6.12.0-55.109.1.el10_0 under RHSA-2026:77634; other applicable RHEL 10 streams are covered by RHSA-2026:45114. Rocky Linux 10.2 users should apply the kernel updates associated with CIQ advisory CRLSA-2026_45114. Select packages for the installed distribution and support stream.
Exploits
No public exploits tracked yet. Mallory keeps watching.
References
Frequently asked questions
- Is CVE-2025-40237 exploited in the wild?
- As of Oct 16, 2026, Mallory has no reports of CVE-2025-40237 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2025-40237?
- As of Oct 16, 2026, Mallory has found no public exploit for CVE-2025-40237.
- Is there a patch for CVE-2025-40237?
- Install the distribution's kernel update addressing CVE-2025-40237 and reboot into the updated kernel. The code fix protects the exportfs_encode_fid() call in show_mark_fhandle() with the superblock s_umount lock to serialize file-handle encoding against unmount.
- How severe is CVE-2025-40237?
- CVE-2025-40237 has an EPSS score of 0.28% (13th percentile) as of Oct 16, 2026.
Recent activity
11 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.