Bug 2383441 (CVE-2025-38396) - CVE-2025-38396 kernel: fs: export anon_inode_make_secure_inode() and fix secretmem LSM bypass
Summary: CVE-2025-38396 kernel: fs: export anon_inode_make_secure_inode() and fix secr...
Keywords:
Status: NEW
Alias: CVE-2025-38396
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-07-25 14:04 UTC by OSIDB Bzimport
Modified: 2025-10-16 08:15 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2025:16904 0 None None None 2025-09-29 07:47:59 UTC

Description OSIDB Bzimport 2025-07-25 14:04:55 UTC
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.

Comment 5 errata-xmlrpc 2025-09-29 07:47:58 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 10

Via RHSA-2025:16904 https://access.redhat.com/errata/RHSA-2025:16904


Note You need to log in before you can comment on or make changes to this bug.