CVE-2026-143402: erofs: hold real inodes for shared files
In the Linux kernel, the following vulnerability has been resolved:
erofs: hold real inodes for shared files
EROFS page cache sharing uses shared inodes. However, a mmaped VMA keeps the shared file even after the corresponding fd is closed, while currently the real inode is never held by any reference associated with the shared file.
As a result, the real inode could be evicted and removed from the shared inode's list while the page fault can still invoke on the shared inode's address space, which causes no candidate is successfully acquired by erofsrealinode().
Fix this by simply keeping the original inode in the shared backing file's private data.
Also replace confusing "realfile"/"rf" names with "sf" (sharedfile) to unify the terms as well as nullify realinode in erofsrealinode() to avoid returning an uninitialized pointer.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In EROFS, keep the original inode in the shared inode list while a page fault can still use it through a mmaped shared file, and nullify realinode in erofs_real_inode() to avoid returning an uninitialized pointer.
Event History
Frequently Asked Questions
What conditions are required to trigger this issue?
The system must use EROFS page-cache sharing, and a shared file must remain mapped in a VMA after its corresponding file descriptor has been closed. A later page fault on that mapping can reach the shared inode after the underlying real inode has been evicted.
Which systems are realistically exposed?
Systems using the Linux kernel with EROFS page-cache sharing are exposed to this lifecycle condition. The issue is relevant where applications mmap shared EROFS files and close the associated descriptors while retaining the mappings.
How can I tell whether a running workload may be affected?
Look for workloads that create mmap mappings of shared EROFS files, close the related file descriptors, and subsequently access pages in those mappings. The vulnerable path involves the real inode being evicted or removed from the shared inode list before a later page fault.
What does the fix change?
The fix stores and retains a reference to the original real inode in the shared backing file's private data. This keeps the real inode available while the shared file can still be used by an existing mapping.