CVE-2025-40072
publishedfanotify: Validate the return value of mnt_ns_from_dentry() before dereferencing
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux58f5fbeb367ff6f30a2448b2cad70f70b2de4b06 to < 73ce2a774ad6497cbd48dc4f8a5d699bc417f3fa · 58f5fbeb367ff6f30a2448b2cad70f70b2de4b06 to < 62e59ffe8787b5550ccff70c30b6f6be6a3ac3dd · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux6.16 (affected) · 0 to < 6.16 (unaffected · semver) · 6.17.3 through 6.17.* (unaffected · semver) · 6.18 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-develaarch64 | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| Ubuntu | noble | linux-buildinfo-6.17.0-1011-oem | Advisory build | 6.17.0-1011.11 | USN-8048-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-develppc64le | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-devels390x | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
Show 96 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-develx86_64 | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-devel-longtermaarch64 | Advisory build | 6.18.16-1.1 | OPENSUSE-SU-2026:10301-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-devel-longtermppc64le | Advisory build | 6.18.16-1.1 | OPENSUSE-SU-2026:10301-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-devel-longterms390x | Advisory build | 6.18.16-1.1 | OPENSUSE-SU-2026:10301-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-devel-longtermx86_64 | Advisory build | 6.18.16-1.1 | OPENSUSE-SU-2026:10301-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-macrosaarch64 | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-macrosppc64le | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-macross390x | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-macrosx86_64 | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-sourceaarch64 | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-sourceppc64le | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-sources390x | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-sourcex86_64 | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-source-longtermaarch64 | Advisory build | 6.18.16-1.1 | OPENSUSE-SU-2026:10301-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-source-longtermppc64le | Advisory build | 6.18.16-1.1 | OPENSUSE-SU-2026:10301-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-source-longterms390x | Advisory build | 6.18.16-1.1 | OPENSUSE-SU-2026:10301-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-source-longtermx86_64 | Advisory build | 6.18.16-1.1 | OPENSUSE-SU-2026:10301-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-source-vanillaaarch64 | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-source-vanillappc64le | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-source-vanillas390x | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-source-vanillax86_64 | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| Ubuntu | noble | linux-headers-6.17.0-1011-oem | Advisory build | 6.17.0-1011.11 | USN-8048-1 |
| Ubuntu | noble | linux-image-unsigned-6.17.0-1011-oem | Advisory build | 6.17.0-1011.11 | USN-8048-1 |
| Ubuntu | noble | linux-modules-6.17.0-1011-oem | Advisory build | 6.17.0-1011.11 | USN-8048-1 |
| Ubuntu | noble | linux-modules-evdi-6.17.0-1011-oem | Advisory build | 6.17.0-1011.11 | USN-8048-1 |
| Ubuntu | noble | linux-modules-ipu6-6.17.0-1011-oem | Advisory build | 6.17.0-1011.11 | USN-8048-1 |
| Ubuntu | noble | linux-modules-ipu7-6.17.0-1011-oem | Advisory build | 6.17.0-1011.11 | USN-8048-1 |
| Ubuntu | noble | linux-modules-iwlwifi-6.17.0-1011-oem | Advisory build | 6.17.0-1011.11 | USN-8048-1 |
| Ubuntu | noble | linux-modules-usbio-6.17.0-1011-oem | Advisory build | 6.17.0-1011.11 | USN-8048-1 |
| Ubuntu | noble | linux-modules-vision-6.17.0-1011-oem | Advisory build | 6.17.0-1011.11 | USN-8048-1 |
| Ubuntu | noble | linux-oem-6.17 | Advisory build | 6.17.0-1011.11 | USN-8048-1 |
| Ubuntu | noble | linux-oem-6.17-headers-6.17.0-1011 | Advisory build | 6.17.0-1011.11 | USN-8048-1 |
| Ubuntu | noble | linux-oem-6.17-tools-6.17.0-1011 | Advisory build | 6.17.0-1011.11 | USN-8048-1 |
| Ubuntu | noble | linux-tools-6.17.0-1011-oem | Advisory build | 6.17.0-1011.11 | USN-8048-1 |
| Ubuntu | questing | bpftool | Advisory build | 7.7.0+6.17.0-14.14 | USN-8029-1 |
| Ubuntu | questing | linux | Advisory build | 6.17.0-14.14 | USN-8029-1 |
| Ubuntu | questing | linux-aws | Advisory build | 6.17.0-1007.7 | USN-8029-2 |
| Ubuntu | questing | linux-aws-cloud-tools-6.17.0-1007 | Advisory build | 6.17.0-1007.7 | USN-8029-2 |
| Ubuntu | questing | linux-aws-headers-6.17.0-1007 | Advisory build | 6.17.0-1007.7 | USN-8029-2 |
| Ubuntu | questing | linux-aws-tools-6.17.0-1007 | Advisory build | 6.17.0-1007.7 | USN-8029-2 |
| Ubuntu | questing | linux-azure | Advisory build | 6.17.0-1008.8 | USN-8029-3 |
| Ubuntu | questing | linux-azure-cloud-tools-6.17.0-1008 | Advisory build | 6.17.0-1008.8 | USN-8029-3 |
| Ubuntu | questing | linux-azure-headers-6.17.0-1008 | Advisory build | 6.17.0-1008.8 | USN-8029-3 |
| Ubuntu | questing | linux-azure-tools-6.17.0-1008 | Advisory build | 6.17.0-1008.8 | USN-8029-3 |
| Ubuntu | questing | linux-buildinfo-6.17.0-1006-realtime | Advisory build | 6.17.0-1006.7 | USN-8029-1 |
| Ubuntu | questing | linux-buildinfo-6.17.0-1007-aws | Advisory build | 6.17.0-1007.7 | USN-8029-2 |
| Ubuntu | questing | linux-buildinfo-6.17.0-1007-aws-64k | Advisory build | 6.17.0-1007.7 | USN-8029-2 |
| Ubuntu | questing | linux-buildinfo-6.17.0-1007-gcp | Advisory build | 6.17.0-1007.7 | USN-8030-1 |
| Ubuntu | questing | linux-buildinfo-6.17.0-1007-gcp-64k | Advisory build | 6.17.0-1007.7 | USN-8030-1 |
| Ubuntu | questing | linux-buildinfo-6.17.0-1007-oracle | Advisory build | 6.17.0-1007.7 | USN-8029-2 |
| Ubuntu | questing | linux-buildinfo-6.17.0-1007-oracle-64k | Advisory build | 6.17.0-1007.7 | USN-8029-2 |
| Ubuntu | questing | linux-buildinfo-6.17.0-1008-azure | Advisory build | 6.17.0-1008.8 | USN-8029-3 |
| Ubuntu | questing | linux-buildinfo-6.17.0-1008-raspi | Advisory build | 6.17.0-1008.8 | USN-8029-1 |
| Ubuntu | questing | linux-buildinfo-6.17.0-14-generic | Advisory build | 6.17.0-14.14 | USN-8029-1 |
| Ubuntu | questing | linux-buildinfo-6.17.0-14-generic-64k | Advisory build | 6.17.0-14.14 | USN-8029-1 |
| Ubuntu | questing | linux-cloud-tools-6.17.0-1006-realtime | Advisory build | 6.17.0-1006.7 | USN-8029-1 |
| Ubuntu | questing | linux-cloud-tools-6.17.0-1007-aws | Advisory build | 6.17.0-1007.7 | USN-8029-2 |
| Ubuntu | questing | linux-cloud-tools-6.17.0-1007-aws-64k | Advisory build | 6.17.0-1007.7 | USN-8029-2 |
| Ubuntu | questing | linux-cloud-tools-6.17.0-1008-azure | Advisory build | 6.17.0-1008.8 | USN-8029-3 |
| Ubuntu | questing | linux-cloud-tools-6.17.0-14 | Advisory build | 6.17.0-14.14 | USN-8029-1 |
| Ubuntu | questing | linux-cloud-tools-6.17.0-14-generic | Advisory build | 6.17.0-14.14 | USN-8029-1 |
| Ubuntu | questing | linux-cloud-tools-common | Advisory build | 6.17.0-14.14 | USN-8029-1 |
| Ubuntu | questing | linux-gcp | Advisory build | 6.17.0-1007.7 | USN-8030-1 |
| Ubuntu | questing | linux-gcp-headers-6.17.0-1007 | Advisory build | 6.17.0-1007.7 | USN-8030-1 |
| Ubuntu | questing | linux-gcp-tools-6.17.0-1007 | Advisory build | 6.17.0-1007.7 | USN-8030-1 |
| Ubuntu | questing | linux-headers-6.17.0-1006-realtime | Advisory build | 6.17.0-1006.7 | USN-8029-1 |
| Ubuntu | questing | linux-headers-6.17.0-1007-aws | Advisory build | 6.17.0-1007.7 | USN-8029-2 |
| Ubuntu | questing | linux-headers-6.17.0-1007-aws-64k | Advisory build | 6.17.0-1007.7 | USN-8029-2 |
| Ubuntu | questing | linux-headers-6.17.0-1007-gcp | Advisory build | 6.17.0-1007.7 | USN-8030-1 |
| Ubuntu | questing | linux-headers-6.17.0-1007-gcp-64k | Advisory build | 6.17.0-1007.7 | USN-8030-1 |
| Ubuntu | questing | linux-headers-6.17.0-1007-oracle | Advisory build | 6.17.0-1007.7 | USN-8029-2 |
| Ubuntu | questing | linux-headers-6.17.0-1007-oracle-64k | Advisory build | 6.17.0-1007.7 | USN-8029-2 |
| Ubuntu | questing | linux-headers-6.17.0-1008-azure | Advisory build | 6.17.0-1008.8 | USN-8029-3 |
| Ubuntu | questing | linux-headers-6.17.0-1008-raspi | Advisory build | 6.17.0-1008.8 | USN-8029-1 |
| Ubuntu | questing | linux-headers-6.17.0-14 | Advisory build | 6.17.0-14.14 | USN-8029-1 |
| Ubuntu | questing | linux-headers-6.17.0-14-generic | Advisory build | 6.17.0-14.14 | USN-8029-1 |
| Ubuntu | questing | linux-headers-6.17.0-14-generic-64k | Advisory build | 6.17.0-14.14 | USN-8029-1 |
| Ubuntu | questing | linux-image-6.17.0-1008-raspi | Advisory build | 6.17.0-1008.8 | USN-8029-1 |
| Ubuntu | questing | linux-image-6.17.0-14-generic | Advisory build | 6.17.0-14.14 | USN-8029-1 |
| Ubuntu | questing | linux-image-unsigned-6.17.0-1006-realtime | Advisory build | 6.17.0-1006.7 | USN-8029-1 |
| Ubuntu | questing | linux-image-unsigned-6.17.0-1007-aws | Advisory build | 6.17.0-1007.7 | USN-8029-2 |
| Ubuntu | questing | linux-image-unsigned-6.17.0-1007-aws-64k | Advisory build | 6.17.0-1007.7 | USN-8029-2 |
| Ubuntu | questing | linux-image-unsigned-6.17.0-1007-gcp | Advisory build | 6.17.0-1007.7 | USN-8030-1 |
| Ubuntu | questing | linux-image-unsigned-6.17.0-1007-gcp-64k | Advisory build | 6.17.0-1007.7 | USN-8030-1 |
| Ubuntu | questing | linux-image-unsigned-6.17.0-1007-oracle | Advisory build | 6.17.0-1007.7 | USN-8029-2 |
| Ubuntu | questing | linux-image-unsigned-6.17.0-1007-oracle-64k | Advisory build | 6.17.0-1007.7 | USN-8029-2 |
| Ubuntu | questing | linux-image-unsigned-6.17.0-1008-azure | Advisory build | 6.17.0-1008.8 | USN-8029-3 |
| Ubuntu | questing | linux-image-unsigned-6.17.0-14-generic | Advisory build | 6.17.0-14.14 | USN-8029-1 |
| Ubuntu | questing | linux-image-unsigned-6.17.0-14-generic-64k | Advisory build | 6.17.0-14.14 | USN-8029-1 |
| Ubuntu | questing | linux-lib-rust-6.17.0-14-generic | Advisory build | 6.17.0-14.14 | USN-8029-1 |
| Ubuntu | questing | linux-modules-6.17.0-1006-realtime | Advisory build | 6.17.0-1006.7 | USN-8029-1 |
| Ubuntu | questing | linux-modules-6.17.0-1007-aws | Advisory build | 6.17.0-1007.7 | USN-8029-2 |
| Ubuntu | questing | linux-modules-6.17.0-1007-aws-64k | Advisory build | 6.17.0-1007.7 | USN-8029-2 |
| Ubuntu | questing | linux-modules-6.17.0-1007-gcp | Advisory build | 6.17.0-1007.7 | USN-8030-1 |
| Ubuntu | questing | linux-modules-6.17.0-1007-gcp-64k | Advisory build | 6.17.0-1007.7 | USN-8030-1 |
| Ubuntu | questing | linux-modules-6.17.0-1007-oracle | Advisory build | 6.17.0-1007.7 | USN-8029-2 |
Package entries are limited to the first 100 builds and 100 linked advisories.
Description
In the Linux kernel, the following vulnerability has been resolved: fanotify: Validate the return value of mnt_ns_from_dentry() before dereferencing The function do_fanotify_mark() does not validate if mnt_ns_from_dentry() returns NULL before dereferencing mntns->user_ns. This causes a NULL pointer dereference in do_fanotify_mark() if the path is not a mount namespace object. Fix this by checking mnt_ns_from_dentry()'s return value before dereferencing it. Before the patch $ gcc fanotify_nullptr.c -o fanotify_nullptr $ mkdir A $ ./fanotify_nullptr Fanotify fd: 3 fanotify_mark: Operation not permitted $ unshare -Urm Fanotify fd: 3 Killed int main(void){ int ffd; ffd = fanotify_init(FAN_CLASS_NOTIF | FAN_REPORT_MNT, 0); if(ffd < 0){ perror("fanotify_init"); exit(EXIT_FAILURE); } printf("Fanotify fd: %d\n",ffd); if(fanotify_mark(ffd, FAN_MARK_ADD | FAN_MARK_MNTNS, FAN_MNT_ATTACH, AT_FDCWD, "A") < 0){ perror("fanotify_mark"); exit(EXIT_FAILURE); } return 0; } After the patch $ gcc fanotify_nullptr.c -o fanotify_nullptr $ mkdir A $ ./fanotify_nullptr Fanotify fd: 3 fanotify_mark: Operation not permitted $ unshare -Urm Fanotify fd: 3 fanotify_mark: Invalid argument [ 25.694973] BUG: kernel NULL pointer dereference, address: 0000000000000038 [ 25.695006] #PF: supervisor read access in kernel mode [ 25.695012] #PF: error_code(0x0000) - not-present page [ 25.695017] PGD 109a30067 P4D 109a30067 PUD 142b46067 PMD 0 [ 25.695025] Oops: Oops: 0000 [#1] SMP NOPTI [ 25.695032] CPU: 4 UID: 1000 PID: 1478 Comm: fanotify_nullpt Not tainted 6.17.0-rc4 #1 PREEMPT(lazy) [ 25.695040] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 11/12/2020 [ 25.695049] RIP: 0010:do_fanotify_mark+0x817/0x950 [ 25.695066] Code: 04 00 00 e9 45 fd ff ff 48 8b 7c 24 48 4c 89 54 24 18 4c 89 5c 24 10 4c 89 0c 24 e8 b3 11 fc ff 4c 8b 54 24 18 4c 8b 5c 24 10 <48> 8b 78 38 4c 8b 0c 24 49 89 c4 e9 13 fd ff ff 8b 4c 24 28 85 c9 [ 25.695081] RSP: 0018:ffffd31c469e3c08 EFLAGS: 00010203 [ 25.695104] RAX: 0000000000000000 RBX: 0000000001000000 RCX: ffff8eb48aebd220 [ 25.695110] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8eb4835e8180 [ 25.695115] RBP: 0000000000000111 R08: 0000000000000000 R09: 0000000000000000 [ 25.695142] R10: ffff8eb48a7d56c0 R11: ffff8eb482bede00 R12: 00000000004012a7 [ 25.695148] R13: 0000000000000110 R14: 0000000000000001 R15: ffff8eb48a7d56c0 [ 25.695154] FS: 00007f8733bda740(0000) GS:ffff8eb61ce5f000(0000) knlGS:0000000000000000 [ 25.695162] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 25.695170] CR2: 0000000000000038 CR3: 0000000136994006 CR4: 00000000003706f0 [ 25.695201] Call Trace: [ 25.695209] <TASK> [ 25.695215] __x64_sys_fanotify_mark+0x1f/0x30 [ 25.695222] do_syscall_64+0x82/0x2c0 ...
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
No normalized assessments.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 58f5fbeb367ff6f30a2448b2cad70f70b2de4b06 to < 73ce2a774ad6497cbd48dc4f8a5d699bc417f3fa (affected · git)58f5fbeb367ff6f30a2448b2cad70f70b2de4b06 to < 62e59ffe8787b5550ccff70c30b6f6be6a3ac3dd (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 6.16 (affected)0 to < 6.16 (unaffected · semver)6.17.3 through 6.17.* (unaffected · semver)6.18 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
2Provider assertions
1Linux · cna
fanotify: Validate the return value of mnt_ns_from_dentry() before dereferencing
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- b3cd7aa0bc74cae32b8366600ffea115449c2c1ac3d59fcbaa7e6f3756b215b6
- Ingested
- 23 Sep 2026, 08:48:04 UTC
- Source record
- Official CVE record