CVE-2026-23375 in Linuxinfo

Summary

by MITRE • 03/25/2026

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

mm: thp: deny THP for files on anonymous inodes

file_thp_enabled() incorrectly allows THP for files on anonymous inodes (e.g. guest_memfd and secretmem). These files are created via alloc_file_pseudo(), which does not call get_write_access() and leaves inode->i_writecount at 0. Combined with S_ISREG(inode->i_mode) being true, they appear as read-only regular files when CONFIG_READ_ONLY_THP_FOR_FS is enabled, making them eligible for THP collapse.

Anonymous inodes can never pass the inode_is_open_for_write() check since their i_writecount is never incremented through the normal VFS open path. The right thing to do is to exclude them from THP eligibility altogether, since CONFIG_READ_ONLY_THP_FOR_FS was designed for real filesystem files (e.g. shared libraries), not for pseudo-filesystem inodes.

For guest_memfd, this allows khugepaged and MADV_COLLAPSE to create large folios in the page cache via the collapse path, but the guest_memfd fault handler does not support large folios. This triggers WARN_ON_ONCE(folio_test_large(folio)) in kvm_gmem_fault_user_mapping().

For secretmem, collapse_file() tries to copy page contents through the direct map, but secretmem pages are removed from the direct map. This can result in a kernel crash:

BUG: unable to handle page fault for address: ffff88810284d000 RIP: 0010:memcpy_orig+0x16/0x130 Call Trace: collapse_file hpage_collapse_scan_file madvise_collapse

Secretmem is not affected by the crash on upstream as the memory failure recovery handles the failed copy gracefully, but it still triggers confusing false memory failure reports:

Memory failure: 0x106d96f: recovery action for clean unevictable LRU page: Recovered

Check IS_ANON_FILE(inode) in file_thp_enabled() to deny THP for all anonymous inode files.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 06/02/2026

The vulnerability described in CVE-2026-23375 affects the Linux kernel's transparent huge page (THP) management system, specifically targeting how the kernel handles memory allocation for files residing on anonymous inodes. This flaw exists within the mm subsystem's THP implementation where the function file_thp_enabled() incorrectly permits transparent huge pages for files created on anonymous inodes such as guest_memfd and secretmem. These pseudo-filesystem inodes are generated through the alloc_file_pseudo() mechanism which bypasses normal write access procedures and maintains inode->i_writecount at zero, creating a scenario where such files appear as read-only regular files under CONFIG_READ_ONLY_THP_FOR_FS settings.

The technical root cause stems from the kernel's inability to properly distinguish between genuine filesystem files and anonymous inodes when evaluating THP eligibility. Anonymous inodes cannot pass the inode_is_open_for_write() validation because their write count is never incremented through the standard VFS open path, yet the current implementation fails to exclude them from THP consideration. This design oversight creates a dangerous condition where the kernel's memory management system attempts to collapse pages for anonymous inodes that lack proper support for large folio operations. The vulnerability manifests differently depending on the specific anonymous inode type, with guest_memfd triggering kernel warnings when large folios are created during collapse operations, while secretmem can cause complete kernel crashes due to failed memory copy operations.

The operational impact of this vulnerability spans multiple security and stability domains, potentially leading to system instability and denial of service conditions. For guest_memfd files, the improper THP handling results in kernel warnings and inconsistent behavior during memory management operations, while secretmem can trigger critical kernel panics that halt system operation. The vulnerability specifically targets the kernel's memory failure recovery mechanisms, causing false positive memory failure reports that can confuse system administrators and obscure genuine hardware issues. This flaw affects systems using KVM virtualization and memory management features, particularly those employing anonymous inodes for guest memory management and secure memory operations. The vulnerability aligns with CWE-119 (Improper Access to Memory) and CWE-248 (Uncaught Exception) categories, representing a memory safety issue that can escalate from benign warnings to complete system crashes. From an ATT&CK perspective, this vulnerability could be leveraged for privilege escalation or denial of service attacks, particularly in virtualized environments where anonymous inodes are commonly used for guest memory management and secure data handling operations.

The recommended mitigation strategy involves implementing a direct check for anonymous inodes within the file_thp_enabled() function by incorporating IS_ANON_FILE(inode) validation to completely exclude anonymous inode files from THP eligibility. This approach ensures that the kernel's memory management system respects the intended scope of CONFIG_READ_ONLY_THP_FOR_FS which was designed for real filesystem files rather than pseudo-filesystem inodes. System administrators should ensure their kernels are updated to versions containing this fix, particularly in virtualized environments where guest_memfd and secretmem are actively used. Organizations should also monitor for false memory failure reports that may indicate this vulnerability's presence, as these can mask genuine hardware problems. The fix addresses the fundamental misclassification of anonymous inodes in the THP decision-making process and restores proper memory management behavior for these special file types, thereby maintaining system stability and preventing potential exploitation scenarios that could lead to unauthorized privilege escalation or system compromise.

Responsible

Linux

Reservation

01/13/2026

Disclosure

03/25/2026

Moderation

accepted

CPE

ready

EPSS

0.00021

KEV

no

Activities

very low

Sources

Might our Artificial Intelligence support you?

Check our Alexa App!