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 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.
Security readout for executives and security teams
Plain-English summary
A Linux kernel regression can let secret-memory file descriptors bypass SELinux or other Linux Security Module checks. A local, low-privileged attacker could potentially undermine security boundaries, with the published assessment indicating serious confidentiality, integrity, and availability impact. The kernel project has resolved the flaw.
Executive priority
Treat as a high-priority kernel update for exposed multi-user or security-sensitive Linux systems. It requires local access, reducing urgency relative to remotely exploitable flaws, but it bypasses an intended security control and carries a 7.8 score. Establish exposure promptly and remediate through supported kernel packages.
Technical view
After alloc_anon_inode(), secretmem failed to clear S_PRIVATE before security initialization, bypassing LSM/SELinux checks. The correction uses anon_inode_make_secure_inode() to create anonymous inodes with the proper security context and exports that function for KVM guest_memfd. CVSS 3.1 is 7.8: local access, low complexity, low privileges, and no user interaction.
Likely exposure
Exposure is limited to Linux systems running an affected kernel where secretmem behavior intersects with LSM or SELinux policy enforcement. The supplied version data includes Linux 6.0 through 6.16-related entries but is insufficiently precise for package-level conclusions. Distribution kernel inventories and advisories should determine actual exposure.
Exploitation context
The CVSS vector describes local, low-privileged exploitation without user interaction; this is not a remote-entry vulnerability. The supplied record is not in KEV and provides no evidence of active exploitation or a public exploit. Practical exploitability and attack prerequisites beyond the affected behavior are not established by these sources.
Researcher notes
The core defect is a secretmem security regression involving S_PRIVATE and anonymous-inode security initialization. Upstream commits are supplied for stable branches, but the bundled affected-version presentation is ambiguous and lists no CWE. Researchers should use kernel history and distribution backport records for branch-specific validation; the sources do not establish exploitation in the wild.
Mitigation direction
Apply a vendor-supported kernel update containing the upstream secretmem security-context fix.
Prioritize multi-user systems and workloads relying on SELinux or another LSM for isolation.
Follow distribution guidance where backported fixes make upstream version comparisons unreliable.
Restrict untrusted local access until affected systems are updated, where operationally feasible.
Validation and detection
Inventory running kernel and distribution package versions across Linux systems.
Confirm vendor advisories or package changelogs include CVE-2025-38396 or the referenced fix.
Identify systems using secretmem and relying on SELinux or LSM policy enforcement.
After updating, verify the fixed kernel is running following any required reboot.
Confirm security policies remain enabled and operating as intended after remediation.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2025-38396 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
1ADP providers
7Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.