CVE-2026-99734: mm/shmem: make shmem_file() check the file's inode
In the Linux kernel, the following vulnerability has been resolved:
mm/shmem: make shmemfile() check the file's inode
shmemfile() only checks if file->fmapping 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 shmemfile() 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 shmemmapping() in collapsefile() instead to not change the behavior of collapsefile(): it operates on the page cache and uses mapping->host for shmem inode operations. Focusing on the file does not seem relevant.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.5 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.5-1
Event History
Frequently Asked Questions
Which systems are realistically exposed to this issue?
Linux kernel systems are affected where seal handling or memfd preservation operates on a file whose mapping is backed by shmem but whose inode is not actually a shmem inode. The described example is a Coda file backed by a tmpfs container after mmap().
What condition is required to trigger the incorrect inode access?
An attacker or triggering workload needs a file with a shmem mapping that belongs to a different file, so that checking file->f_mapping incorrectly treats the file as shmem. The vulnerable paths then access shmem inode state through an inode of the wrong type.
Are ordinary tmpfs files and memfds themselves misidentified by the corrected check?
No. The revised inode-based check is described as reliably identifying regular shmem inodes, including ordinary tmpfs files and memfds, even when wrapper file operations are involved.