diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-06-12 22:02:41 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-06-12 22:02:41 +0300 |
commit | 923ea1631e942f8af179ca418e0cc1915025e4c2 (patch) | |
tree | 1ce8f2af7ae5f8bafd0820eac0546961909d1cbc /security/integrity/ima/ima_main.c | |
parent | 4071b856afc8a49ec41e98ff45151bb0800bc46d (diff) | |
parent | 4235b1a4efe19dd0309250170bbf0aa95e559626 (diff) | |
download | linux-923ea1631e942f8af179ca418e0cc1915025e4c2.tar.xz |
Merge tag 'integrity-v5.8-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity
Pull integrity fix from Mimi Zohar:
"ima mprotect performance fix"
* tag 'integrity-v5.8-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity:
ima: fix mprotect checking
Diffstat (limited to 'security/integrity/ima/ima_main.c')
-rw-r--r-- | security/integrity/ima/ima_main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c index 800fb3bba418..c1583d98c5e5 100644 --- a/security/integrity/ima/ima_main.c +++ b/security/integrity/ima/ima_main.c @@ -419,7 +419,8 @@ int ima_file_mprotect(struct vm_area_struct *vma, unsigned long prot) int pcr; /* Is mprotect making an mmap'ed file executable? */ - if (!vma->vm_file || !(prot & PROT_EXEC) || (vma->vm_flags & VM_EXEC)) + if (!(ima_policy_flag & IMA_APPRAISE) || !vma->vm_file || + !(prot & PROT_EXEC) || (vma->vm_flags & VM_EXEC)) return 0; security_task_getsecid(current, &secid); |