• Mimi Zohar's avatar
    ima: prevent a file already mmap'ed write to be mmap'ed execute · 2cd4737b
    Mimi Zohar authored
    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.
    
    From an IMA perspective, measuring/appraising the integrity of a file
    being mmap'ed shared execute, without first making sure the file cannot
    be modified, makes no sense.  This patch prevents files, in policy,
    already mmap'ed shared write, from being mmap'ed execute.
    Signed-off-by: default avatarMimi Zohar <zohar@linux.ibm.com>
    2cd4737b
ima_main.c 17.5 KB