CVE-2025-38396: fs: export anon_inode_make_secure_inode() and fix secretmem LSM bypass
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 allocanoninode(), 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.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-38396?
CVE-2025-38396 has a severity rating that indicates a potential security risk in the Linux kernel related to improper handling of anonymous inodes.
How do I fix CVE-2025-38396?
To fix CVE-2025-38396, update your Linux kernel to the latest version where the vulnerability has been patched.
What is the impact of CVE-2025-38396 on system security?
CVE-2025-38396 could allow for a security context bypass, potentially compromising the isolation of KVM guest memory.
Which versions of the Linux kernel are affected by CVE-2025-38396?
CVE-2025-38396 affects certain versions of the Linux kernel prior to the implementation of the fix.
Is there a public exploit available for CVE-2025-38396?
As of now, there are no known public exploits specifically targeting CVE-2025-38396.