selinux: fix overlayfs mmap() and mprotect() access checks
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
selinux: fix overlayfs mmap() and mprotect() access checks
The existing SELinux security model for overlayfs is to allow access if the current task is able to access the top level file (the "user" file) and the mounter's credentials are sufficient to access the lower level file (the "backing" file). Unfortunately, the current code does not properly enforce these access controls for both mmap() and mprotect() operations on overlayfs filesystems.
This patch makes use of the newly created security_mmap_backing_file() LSM hook to provide the missing backing file enforcement for mmap() operations, and leverages the backing file API and new LSM blob to provide the necessary information to properly enforce the mprotect() access controls.
From the CVE record · Linux
The Linux kernel does not properly enforce SELinux backing-file access checks for mmap() and mprotect() on overlayfs files. A local task that can access the top-level file may be allowed these operations even when the mounter's credentials are insufficient to access the backing file.
Engineers running Linux kernels that use SELinux with overlayfs should check whether their kernel includes the fix; affected versions were not specified.