diff options
| author | Stephen Smalley <stephen.smalley.work@gmail.com> | 2026-11-06 13:29:13 -0500 |
|---|---|---|
| committer | Paul Moore <paul@paul-moore.com> | 2026-11-09 18:32:04 -0500 |
| commit | beb0ae6bcd7505e2e61babe5d98a8dd3b3f03c7f (patch) | |
| tree | 52ab26c0ef6f72b69a6ba9e84008af3770f279e6 /kernel/debug/debug_core.h | |
| parent | 7475ea8b58616b33c04afb976cf0fbaad9dd63fb (diff) | |
selinux: check MAP_SHARED_VALIDATE mappings as shared
selinux_mmap_file() only recognizes MAP_SHARED as a shared mapping,
but MAP_SHARED_VALIDATE is also a shared mapping type. The mmap flags
reach this hook before the mm code processes the mapping type.
Consequently, a writable MAP_SHARED_VALIDATE mapping was failing to
check the file write permission at mmap time, and a writable
executable file mapping was wrongly checking process execmem
permission as if it were private.
Cc: stable@vger.kernel.org
Link: https://github.com/SELinuxProject/selinux-kernel/issues/78
Fixes: 1c9725974074 ("mm: introduce MAP_SHARED_VALIDATE, a mechanism to safely define new mmap flags")
Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'kernel/debug/debug_core.h')
0 files changed, 0 insertions, 0 deletions
