mirror of
https://github.com/torvalds/linux.git
synced 2026-11-20 13:03:48 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user