linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ima: addressing mmap/mprotect concerns
@ 2019-05-06 16:57 Mimi Zohar
  2019-05-06 16:57 ` [PATCH 1/3] ima: verify mprotect change is consistent with mmap policy Mimi Zohar
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mimi Zohar @ 2019-05-06 16:57 UTC (permalink / raw)
  To: linux-integrity
  Cc: linux-kernel, Igor Zhbanov, Jordan Glover, Al Viro, Mimi Zohar

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/cce2c4c7-5333-41c3-aeef-34d43e63acb0@omprussia.ru/
[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(-)

-- 
2.7.5


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-05-06 16:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-06 16:57 [PATCH 0/3] ima: addressing mmap/mprotect concerns Mimi Zohar
2019-05-06 16:57 ` [PATCH 1/3] ima: verify mprotect change is consistent with mmap policy Mimi Zohar
2019-05-06 16:57 ` [PATCH 2/3] ima: prevent a file already mmap'ed write to be mmap'ed execute Mimi Zohar
2019-05-06 16:57 ` [PATCH 3/3] ima: prevent a file already mmap'ed read|execute to be mmap'ed write Mimi Zohar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).