mm/shmem: make shmem_file() check the file's inode
Summary
| CVE | CVE-2026-99734 |
| State | PUBLISHED |
| Assigner | Linux |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-11-20 06:18:10 UTC |
| Updated | 2026-11-20 06:18:10 UTC |
| Description | 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. |
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|
| CNA |
Linux |
Linux |
affected c49fcfcda8b5b06529103664f0291f433f5e6d24 ea5cc241113f7820ce037dbcf8b7eb959fbf1c0d git |
Not specified |
| CNA |
Linux |
Linux |
affected c49fcfcda8b5b06529103664f0291f433f5e6d24 d3710111839d11339e414b1bb3fea3d05ab83f6e git |
Not specified |
| CNA |
Linux |
Linux |
affected 4.18 |
Not specified |
| CNA |
Linux |
Linux |
unaffected 4.18 semver |
Not specified |
| CNA |
Linux |
Linux |
unaffected 7.3.5 7.3.* semver |
Not specified |
| CNA |
Linux |
Linux |
unaffected 7.4-rc2 * original_commit_for_fix |
Not specified |
References
| Reference | Source | Link | Tags |
|---|
| git.kernel.org/stable/c/d3710111839d11339e414b1bb3fea3d05ab83f6e |
416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
git.kernel.org |
|
| git.kernel.org/stable/c/ea5cc241113f7820ce037dbcf8b7eb959fbf1c0d |
416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
git.kernel.org |
|
| CVE Program record |
CVE.ORG |
www.cve.org |
canonical |
| NVD vulnerability detail |
NVD |
nvd.nist.gov |
canonical, analysis |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.