{"answers":{"affected":"","exploited":"There is no known exploitation of CVE-2025-40072 in the wild and no public exploit code.","fix":"Apply the vendor's patch.","what":"CVE-2025-40072 is a vulnerability in Linux, published on 28 Oct 2025. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-40072 and fix it if it is affected.\n\nWhat it is: CVE-2025-40072 is a vulnerability in Linux, published on 28 Oct 2025. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2025-40072 in the wild and no public exploit code.\n\nAffected product: Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-40072/ (Markdown: https://insights.sbomify.com/CVE-2025-40072/index.md)","id":"CVE-2025-40072","markdown":"https://insights.sbomify.com/CVE-2025-40072/index.md","name":"CVE-2025-40072","record":{"aliases":["BELL-CVE-2025-40072","DEBIAN-CVE-2025-40072","GHSA-w5hw-p7rf-8672","UBUNTU-CVE-2025-40072"],"analysis":{"component_type":"kernel","fix_type":"patch","impacts":["denial_of_service"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Linux kernel","requires_auth":"low_privilege","summary":"A local attacker can trigger a kernel NULL pointer dereference in fanotify, causing a system crash and denial of service.","user_interaction":"not_required","vuln_class":"null_dereference"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"Linux","cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"In the Linux kernel, the following vulnerability has been resolved:\n\nfanotify: Validate the return value of mnt_ns_from_dentry() before dereferencing\n\nThe function do_fanotify_mark() does not validate if\nmnt_ns_from_dentry() returns NULL before dereferencing mntns-\u003euser_ns.\nThis causes a NULL pointer dereference in do_fanotify_mark() if the\npath is not a mount namespace object.\n\nFix this by checking mnt_ns_from_dentry()'s return value before\ndereferencing it.\n\nBefore the patch\n\n$ gcc fanotify_nullptr.c -o fanotify_nullptr\n$ mkdir A\n$ ./fanotify_nullptr\nFanotify fd: 3\nfanotify_mark: Operation not permitted\n$ unshare -Urm\nFanotify fd: 3\nKilled\n\nint main(void){\n    int ffd;\n    ffd = fanotify_init(FAN_CLASS_NOTIF | FAN_REPORT_MNT, 0);\n    if(ffd \u003c 0){\n        perror(\"fanotify_init\");\n        exit(EXIT_FAILURE);\n    }\n\n    printf(\"Fanotify fd: %d\\n\",ffd);\n\n    if(fanotify_mark(ffd, FAN_MARK_ADD | FAN_MARK_MNTNS,\nFAN_MNT_ATTACH, AT_FDCWD, \"A\") \u003c 0){\n        perror(\"fanotify_mark\");\n        exit(EXIT_FAILURE);\n    }\n\nreturn 0;\n}\n\nAfter the patch\n\n$ gcc fanotify_nullptr.c -o fanotify_nullptr\n$ mkdir A\n$ ./fanotify_nullptr\nFanotify fd: 3\nfanotify_mark: Operation not permitted\n$ unshare -Urm\nFanotify fd: 3\nfanotify_mark: Invalid argument\n\n[   25.694973] BUG: kernel NULL pointer dereference, address: 0000000000000038\n[   25.695006] #PF: supervisor read access in kernel mode\n[   25.695012] #PF: error_code(0x0000) - not-present page\n[   25.695017] PGD 109a30067 P4D 109a30067 PUD 142b46067 PMD 0\n[   25.695025] Oops: Oops: 0000 [#1] SMP NOPTI\n[   25.695032] CPU: 4 UID: 1000 PID: 1478 Comm: fanotify_nullpt Not\ntainted 6.17.0-rc4 #1 PREEMPT(lazy)\n[   25.695040] Hardware name: VMware, Inc. VMware Virtual\nPlatform/440BX Desktop Reference Platform, BIOS 6.00 11/12/2020\n[   25.695049] RIP: 0010:do_fanotify_mark+0x817/0x950\n[   25.695066] Code: 04 00 00 e9 45 fd ff ff 48 8b 7c 24 48 4c 89 54\n24 18 4c 89 5c 24 10 4c 89 0c 24 e8 b3 11 fc ff 4c 8b 54 24 18 4c 8b\n5c 24 10 \u003c48\u003e 8b 78 38 4c 8b 0c 24 49 89 c4 e9 13 fd ff ff 8b 4c 24 28\n85 c9\n[   25.695081] RSP: 0018:ffffd31c469e3c08 EFLAGS: 00010203\n[   25.695104] RAX: 0000000000000000 RBX: 0000000001000000 RCX: ffff8eb48aebd220\n[   25.695110] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8eb4835e8180\n[   25.695115] RBP: 0000000000000111 R08: 0000000000000000 R09: 0000000000000000\n[   25.695142] R10: ffff8eb48a7d56c0 R11: ffff8eb482bede00 R12: 00000000004012a7\n[   25.695148] R13: 0000000000000110 R14: 0000000000000001 R15: ffff8eb48a7d56c0\n[   25.695154] FS:  00007f8733bda740(0000) GS:ffff8eb61ce5f000(0000)\nknlGS:0000000000000000\n[   25.695162] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\n[   25.695170] CR2: 0000000000000038 CR3: 0000000136994006 CR4: 00000000003706f0\n[   25.695201] Call Trace:\n[   25.695209]  \u003cTASK\u003e\n[   25.695215]  __x64_sys_fanotify_mark+0x1f/0x30\n[   25.695222]  do_syscall_64+0x82/0x2c0\n...","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"fanotify: Validate the return value of mnt_ns_from_dentry() before dereferencing","id":"CVE-2025-40072","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"null_dereference","year":"2025"},"n_packages":0,"n_references":2,"next":{"headline":"drm/msm: Do not validate SSPP when it is not ready","id":"CVE-2025-40073"},"packages":[],"prev":{"headline":"tty: n_gsm: Don't block input queue by waiting MSC","id":"CVE-2025-40071"},"products":["Linux"],"published":"2025-10-28","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2026-05-11","vendors":["Linux"]},"summary":"A local attacker can trigger a kernel NULL pointer dereference in fanotify, causing a system crash and denial of service.","url":"https://insights.sbomify.com/CVE-2025-40072/"}