Merge tag 'selinux-pr-20261119' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux

Pull selinux fix from Paul Moore:
 "A single SELinux fix for a problem where we were not properly handling
  MAP_SHARED_VALIDATE"

* tag 'selinux-pr-20261119' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
  selinux: check MAP_SHARED_VALIDATE mappings as shared
This commit is contained in:
Linus Torvalds
2026-11-19 14:05:24 -08:00
+4 -1
View File
@@ -4179,8 +4179,11 @@ static int selinux_mmap_file(struct file *file,
unsigned long reqprot __always_unused,
unsigned long prot, unsigned long flags)
{
const unsigned long map_type = (flags & MAP_TYPE);
return selinux_mmap_file_common(file, prot,
(flags & MAP_TYPE) == MAP_SHARED,
(map_type == MAP_SHARED ||
map_type == MAP_SHARED_VALIDATE),
false);
}