projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d77ccdc
)
ima: clear IMA_HASH
author
Mimi Zohar
<zohar@linux.vnet.ibm.com>
Sun, 11 Mar 2018 04:07:34 +0000
(23:07 -0500)
committer
Mimi Zohar
<zohar@linux.vnet.ibm.com>
Fri, 23 Mar 2018 10:31:37 +0000
(06:31 -0400)
The IMA_APPRAISE and IMA_HASH policies overlap. Clear IMA_HASH properly.
Fixes:
da1b0029f527
("ima: support new "hash" and "dont_hash" policy actions")
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
security/integrity/ima/ima_policy.c
patch
|
blob
|
history
diff --git
a/security/integrity/ima/ima_policy.c
b/security/integrity/ima/ima_policy.c
index
e3da29a
..
40557c0
100644
(file)
--- a/
security/integrity/ima/ima_policy.c
+++ b/
security/integrity/ima/ima_policy.c
@@
-389,7
+389,7
@@
int ima_match_policy(struct inode *inode, const struct cred *cred, u32 secid,
action |= entry->action & IMA_DO_MASK;
if (entry->action & IMA_APPRAISE) {
action |= get_subaction(entry, func);
- action
^=
IMA_HASH;
+ action
&= ~
IMA_HASH;
}
if (entry->action & IMA_DO_MASK)