CVE-2026-99734 in Linux
Summary
by MITRE • 11/20/2026
In the Linux kernel, the following vulnerability has been resolved:
mm/shmem: make shmem_file() check the file's inode
shmem_file() only checks if file->f_mapping is a shmem mapping. This mapping can belong to another file, however, as with a Coda file backed by a tmpfs container after mmap().
So it does not guarantee that the file inode is an actual shmem inode.
Seal handling and memfd preservation use this check before accessing shmem inode state, so they can access an inode of the wrong type.
Let's make shmem_file() check the inode's file operations instead, to identify shmem inodes reliably. This will identify regular shmem inodes, including memfds and ordinary tmpfs files, independently of wrapper file operations.
Use shmem_mapping() in collapse_file() instead to not change the behavior of collapse_file(): it operates on the page cache and uses mapping->host for shmem inode operations. Focusing on the file does not seem relevant.
If you want to get best quality of vulnerability data, you may have to visit VulDB.
Analysis
by VulDB Data Team • 11/20/2026
The Linux kernel contains a logic flaw within the memory management subsystem, specifically affecting the shared memory implementation in mm/shmem.c. The vulnerability stems from an insufficient validation mechanism used by the function shmem_file(). This function is designed to determine whether a given file object corresponds to a shared memory inode. However, its current implementation relies solely on checking if the file's address space mapping pointer points to a shmem mapping structure. While this check confirms that the underlying storage backend is shared memory, it fails to verify that the specific file inode associated with the open file descriptor is actually of type shmem. This distinction is critical because Linux allows for complex file system hierarchies and wrapper operations where an open file may reference a different inode than the one directly backing its mapping.
This oversight creates a scenario where code paths relying on shmem_file() to validate security properties or state integrity can be misled into operating on inodes of incorrect types. A concrete example involves Coda files that are backed by tmpfs containers after being memory-mapped via mmap(). In such configurations, the file's mapping may indeed point to shared memory structures, yet the inode itself remains a regular Coda inode rather than an shmem inode. When seal handling mechanisms or memfd preservation logic invoke this flawed check, they proceed under the false assumption that they are interacting with a standard shmem object. This misidentification can lead to accessing inode state fields that do not exist or have different meanings in non-shmem inodes, potentially causing kernel instability, data corruption, or unauthorized access patterns depending on how subsequent operations utilize the incorrectly identified structure.
The operational impact of this vulnerability is primarily related to system stability and potential privilege escalation vectors if exploited by a local user with appropriate file descriptor privileges. By bypassing strict type checking, an attacker could potentially trigger undefined behavior within kernel memory management routines that expect shmem-specific invariants. These invariants include specific locking mechanisms, accounting structures, and state flags unique to tmpfs or memfd implementations. If the kernel attempts to apply these shmem-specific operations to a generic inode from another file system like Coda, it may result in null pointer dereferences, use-after-free conditions, or memory corruption. This aligns with CWE-20 Improper Input Validation and CWE-841 Improper Enforcement of Behavioral Restrictions, as the kernel fails to strictly enforce that the object type matches the expected behavior for security-critical operations like sealing file descriptors or preserving memfd state across system calls.
To mitigate this vulnerability, the Linux kernel developers have updated shmem_file() to perform a more robust verification by checking the inode's file operations instead of just its mapping. This approach ensures reliable identification of actual shmem inodes, including both standard tmpfs files and memory file descriptors (memfds), regardless of any wrapper file operations that might obscure the underlying type. By inspecting the file operation vector associated with the inode, the kernel can definitively distinguish between true shared memory objects and other file types that merely share a similar mapping backend. Additionally, related functions such as collapse_file() have been adjusted to use shmem_mapping() directly rather than relying on file-based checks, ensuring consistent behavior for page cache operations without introducing new inconsistencies. System administrators should ensure their kernels are updated with the patch addressing this issue in mm/shmem.c to restore strict type enforcement and prevent potential exploitation of these logic errors.