CVE-2025-38396
fs: export anon_inode_make_secure_inode() and fix secretmem LSM bypass
Reported by linux · Published July 25, 2025
In the Linux kernel, the following vulnerability has been resolved: fs: export anon_inode_make_secure_inode() and fix secretmem LSM bypass Export anon_inode_make_secure_inode() to allow KVM guest_memfd to create anonymous inodes with proper security context. This replaces the current pattern of calling alloc_anon_inode() followed by inode_init_security_anon() for creating security context manually. This change also fixes a security regression in secretmem where the S_PRIVATE flag was not cleared after alloc_anon_inode(), causing LSM/SELinux checks to be bypassed for secretmem file descriptors. As guest_memfd currently resides in the KVM module, we need to export this symbol for use outside the core kernel. In the future, guest_memfd might be moved to core-mm, at which point the symbols no longer would have to be exported. When/if that happens is still unclear.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| python3-perf6.12 | Amazon Linux | 1:6.12.37-61.105.amzn2023 |
| Linux | Linux | e3eed01347721cd7a8819568161c91d538fbf229, 6ca45ea48530332a4ba09595767bd26d3232743b, 66d29d757c968d2bee9124816da5d718eb352959, 6.0 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 2bfe15c5261212130f1a71f32a300bcf426443d4, 2bfe15c5261212130f1a71f32a300bcf426443d4, 2bfe15c5261212130f1a71f32a300bcf426443d4 |
| Linux | Linux | 6.0, 0, 6.1.146 |
| amazon:2023 | python3-perf6.12 | 0 |
| Linux | Linux | 2bfe15c5261212130f1a71f32a300bcf426443d4, 2bfe15c5261212130f1a71f32a300bcf426443d4, 6.15.6 |
| amazon:2023 | python3-perf | 0 |
| linux | linux_kernel | 6.0, 6.0, 6.0 |
| amazon:2023 | kernel6.12-libbpf-devel | 0 |
| amazon:2023 | kernel6.12-headers | 0 |
| amazon:2023 | kernel6.12-modules-extra-common | 0 |
| amazon:2023 | kernel-modules-extra | 0 |
| amazon:2023 | kernel6.12-libbpf-static | 0 |
| amazon:2023 | kernel-headers | 0 |
| amazon:2023 | perf6.12 | 0 |
| amazon:2023 | kernel-libbpf-static | 0 |
| amazon:2023 | bpftool6.12 | 0 |
| amazon:2023 | kernel6.12-libbpf | 0 |
| amazon:2023 | kernel-livepatch-6.12.37-61.105 | 0 |
| amazon:2023 | kernel-tools-devel | 0 |
| amazon:2023 | perf | 0 |
| amazon:2023 | kernel6.12-tools | 0 |
…and 12 more
Timeline
- Jul 25, 2025 CVE Published
- Jul 26, 2025 EPSS Score (30 in total, the first dated here)
- Oct 12, 2025 PoC Published (16 in total, the first dated here)
- Nov 17, 2025 CVE Updated
- Mar 29, 2026 Distribution Patch (215 in total, the first dated here)
- Mar 29, 2026 Security Advisory (231 in total, the first dated here)
- Jun 9, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-38396
vulnetix vdb fixes CVE-2025-38396
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-38396/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart