diff options
author | Roberto Sassu <roberto.sassu@huawei.com> | 2017-11-07 11:37:07 +0100 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2017-11-20 08:23:10 +1100 |
commit | 020aae3ee58c1af0e7ffc4e2cc9fe4dc630338cb (patch) | |
tree | cfe2a7b52894badb8c2a792c241e5a0e6092f56b /security/yama | |
parent | ed30b147e1f6e396e70a52dbb6c7d66befedd786 (diff) | |
download | talos-obmc-linux-020aae3ee58c1af0e7ffc4e2cc9fe4dc630338cb.tar.gz talos-obmc-linux-020aae3ee58c1af0e7ffc4e2cc9fe4dc630338cb.zip |
ima: do not update security.ima if appraisal status is not INTEGRITY_PASS
Commit b65a9cfc2c38 ("Untangling ima mess, part 2: deal with counters")
moved the call of ima_file_check() from may_open() to do_filp_open() at a
point where the file descriptor is already opened.
This breaks the assumption made by IMA that file descriptors being closed
belong to files whose access was granted by ima_file_check(). The
consequence is that security.ima and security.evm are updated with good
values, regardless of the current appraisal status.
For example, if a file does not have security.ima, IMA will create it after
opening the file for writing, even if access is denied. Access to the file
will be allowed afterwards.
Avoid this issue by checking the appraisal status before updating
security.ima.
Cc: stable@vger.kernel.org
Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Diffstat (limited to 'security/yama')
0 files changed, 0 insertions, 0 deletions