linux/security/selinux/include
Paul Moore 82544d36b1 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.

Cc: stable@vger.kernel.org
Acked-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
2026-04-03 16:53:50 -04:00
..
audit.h selinux: move initcalls to the LSM framework 2025-10-22 19:24:28 -04:00
avc.h selinux: introduce neveraudit types 2025-06-19 17:23:04 -04:00
avc_ss.h selinux: fix style issues in security/selinux/include/avc_ss.h 2023-12-22 18:09:26 -05:00
classmap.h selinux: add support for BPF token access control 2026-01-13 15:42:37 -05:00
conditional.h selinux: constify and reconcile function parameter names 2025-01-07 23:14:38 -05:00
hash.h selinux: improve bucket distribution uniformity of avc_hash() 2025-10-23 18:24:30 -04:00
ibpkey.h
ima.h selinux: fix style issues in security/selinux/include/ima.h 2023-12-22 18:09:28 -05:00
initcalls.h selinux: move initcalls to the LSM framework 2025-10-22 19:24:28 -04:00
initial_sid_to_string.h selinux: do not include <linux/*.h> headers from host programs 2024-10-03 15:34:24 -04:00
netif.h selinux: fix style issues in security/selinux/include/netif.h 2023-12-22 18:09:28 -05:00
netlabel.h selinux: fix style issues with security/selinux/include/netlabel.h 2023-12-22 18:09:28 -05:00
netnode.h selinux: constify network address pointer 2025-04-11 16:29:50 -04:00
netport.h
objsec.h selinux: fix overlayfs mmap() and mprotect() access checks 2026-04-03 16:53:50 -04:00
policycap.h selinux: add support for BPF token access control 2026-01-13 15:42:37 -05:00
policycap_names.h selinux: add support for BPF token access control 2026-01-13 15:42:37 -05:00
security.h selinux: add support for BPF token access control 2026-01-13 15:42:37 -05:00
xfrm.h selinux: fix style issues in security/selinux/include/xfrm.h 2023-12-22 18:09:30 -05:00