CVE-2025-40072: Linux kernel fanotify mount-namespace NULL pointer dereference
CVE-2025-40072 is a NULL pointer dereference in the Linux kernel fanotify subsystem. In do_fanotify_mark(), the return value of mnt_ns_from_dentry() was dereferenced through mntns->user_ns without first confirming it was non-NULL. A supplied path that is not a mount-namespace object can cause the helper to return NULL and trigger the fault. The issue was introduced in Linux kernel 6.16 and affects fanotify mount-namespace monitoring.
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.
Successful triggering causes a kernel NULL pointer dereference in do_fanotify_mark(), resulting in a kernel crash and denial of service or other negative disruption to system operation.
Mitigation
If you can’t patch tonight, do this now.
If immediate patching is not possible, reduce exposure by restricting local unprivileged access to affected systems, especially environments that permit unprivileged user namespaces. Limiting or disabling use of the affected fanotify mount-namespace monitoring functionality where operationally feasible may reduce exploitability. The durable mitigation is kernel upgrade to a fixed version.
Remediation
Patch, then assume compromise.
Update to Linux kernel 6.17.3 or later stable releases. The upstream correction validates the return value of mnt_ns_from_dentry() before dereferencing mntns->user_ns. Updating to a current stable kernel release is recommended over cherry-picking an individual patch.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Frequently asked questions
- Is CVE-2025-40072 exploited in the wild?
- As of Oct 1, 2026, Mallory has no reports of CVE-2025-40072 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2025-40072?
- As of Oct 1, 2026, Mallory has found no public exploit for CVE-2025-40072.
- Is there a patch for CVE-2025-40072?
- Update to Linux kernel 6.17.3 or later stable releases. The upstream correction validates the return value of mnt_ns_from_dentry() before dereferencing mntns->user_ns.
- How severe is CVE-2025-40072?
- CVE-2025-40072 has an EPSS score of 0.18% (8th percentile) as of Oct 1, 2026.
Recent activity
5 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.