Skip to content

ima: addressing mmap/mprotect concerns

Mimi Zohar linux-integrity lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ima: verify mprotect change is consistent with mmap policysecurity/security.c+6 -10 replies
2/3ima: prevent a file already mmap'ed write to be mmap'ed executesecurity/integrity/ima/ima_main.c+30 -20 replies
3/3ima: prevent a file already mmap'ed read|execute to be mmap'ed writeinclude/linux/ima.h security/integrity/ima/ima_main.c security/security.c+26 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] ima: addressing mmap/mprotect concerns

Igor Zhbanov's "Should mprotect(..., PROT_EXEC) be checked by IMA?" thread raised concerns about IMA's handling of mmap/mprotect. [1] The kernel calls deny_write_access() to prevent a file already opened for write from being executed and also prevents files being executed from being opened for write. For some reason this does not extend to files being mmap'ed execute. This is a known, well described problem.[2] Jordan Glover commented that the proposed minor LSM "SARA" addresses this issue.[3]

This patch set attempts to address some the IMA mmap/mprotect concerns without locking the mmap'ed files.

Mimi

[1] https://lore.kernel.org/linux-integrity/[email protected]/
[2] ]https://pax.grsecurity.net/docs/mprotect.txt
[3] https://sara.smeso.it/en/latest/

Mimi Zohar (3):
ima: verify mprotect change is consistent with mmap policy
ima: prevent a file already mmap'ed write to be mmap'ed execute
ima: prevent a file already mmap'ed read|execute to be mmap'ed write

 include/linux/ima.h               |  6 +++--
 security/integrity/ima/ima_main.c | 53 ++++++++++++++++++++++++++++++++++++---
 security/security.c               |  9 +++++--
 3 files changed, 61 insertions(+), 7 deletions(-)
Signature · 1 line
2.7.5