CVE-2025-38396

Source
https://cve.org/CVERecord?id=CVE-2025-38396
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-38396.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-38396
Downstream
Related
Published
2025-07-25T12:53:40.761Z
Modified
2026-03-20T12:42:50.402275Z
Summary
fs: export anon_inode_make_secure_inode() and fix secretmem LSM bypass
Details

In the Linux kernel, the following vulnerability has been resolved:

fs: export anoninodemakesecureinode() and fix secretmem LSM bypass

Export anoninodemakesecureinode() to allow KVM guestmemfd to create anonymous inodes with proper security context. This replaces the current pattern of calling allocanoninode() followed by inodeinitsecurityanon() for creating security context manually.

This change also fixes a security regression in secretmem where the SPRIVATE flag was not cleared after allocanon_inode(), causing LSM/SELinux checks to be bypassed for secretmem file descriptors.

As guestmemfd currently resides in the KVM module, we need to export this symbol for use outside the core kernel. In the future, guestmemfd 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.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38396.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
2bfe15c5261212130f1a71f32a300bcf426443d4
Fixed
66d29d757c968d2bee9124816da5d718eb352959
Fixed
e3eed01347721cd7a8819568161c91d538fbf229
Fixed
f94c422157f3e43dd31990567b3e5d54b3e5b32b
Fixed
6ca45ea48530332a4ba09595767bd26d3232743b
Fixed
cbe4134ea4bc493239786220bd69cb8a13493190

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-38396.json"