CVE-2026-98215: selinux: preserve user SID across nested backing files
In the Linux kernel, the following vulnerability has been resolved:
selinux: preserve user SID across nested backing files
SELinux saves the user file SID in a backing-file security blob so it remains available after mmap() replaces vma->vmfile with a backing file.
For nested backing files (overlayfs over overlayfs, or FUSE passthrough backed by overlayfs), userfile may itself be a backing file. Its fsec->sid is the SID of the mounter that opened it, rather than the user that opened the top-level file. mprotect() then checks fd { use } against the mounter SID. This can incorrectly deny access without a domain transition, or check the wrong target SID after one.
Copy the saved user SID when userfile is a backing file. Keep using the regular file SID for the first backing layer.
With two nested overlayfs mounts and SELinux enforcing, mprotect(PROTREAD) returns EACCES with an fd { use } denial against the mounter SID. With this change, mprotect() succeeds.
Tested on arm64 QEMU with a small BusyBox initramfs and a purpose-built SELinux policy. The original test was also repeated with Fedora Cloud Base 44 userspace and gave the same result.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 6.6.158.1-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.115-2Fixed in 7.2.12-1Fixed in 7.2.15-1 - Upgrade
Upgrade
debian/linux-6.12to a version that resolves this vulnerability.Fixed in 6.12.113-1~deb12u1 - Upgrade
Upgrade
ubuntu/linux-hwe-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-42.42 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1016.17 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1016.18 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.0.0-1015.16 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1
Event History
Frequently Asked Questions
Which systems are likely to encounter this issue?
Systems using SELinux in enforcing mode with nested backing files are affected by the described behavior. Examples include overlayfs mounted over another overlayfs instance, or FUSE passthrough backed by overlayfs.
What operation triggers the failure?
The issue occurs when mprotect() performs an fd { use } permission check after mmap() has replaced the VMA file with a backing file. In the demonstrated case, mprotect(PROT_READ) returned EACCES for a file accessed through two nested overlayfs mounts.
What is the practical impact?
SELinux can check the mounter's SID instead of the SID of the user who opened the top-level file. This can cause an incorrect access denial without a domain transition, or evaluate the wrong target SID after a domain transition.
How can administrators identify this condition?
Look for SELinux fd { use } denials during mprotect() involving nested overlayfs or FUSE-passthrough-backed overlayfs paths. The reported denial will be against the mounter SID rather than the SID of the user that opened the top-level file.