diff options
author | Sasha Levin <sasha.levin@oracle.com> | 2015-12-22 08:51:23 -0500 |
---|---|---|
committer | Mimi Zohar <zohar@linux.vnet.ibm.com> | 2015-12-24 18:56:45 -0500 |
commit | 0112721df4edbdd07b800813300d76811572f080 (patch) | |
tree | 9ad07cfcfdd6aedb1c0764187b95646d05b83b1a /security/integrity/ima/ima.h | |
parent | 92cc916638a48f285736cd5541536e2e1b73ecf8 (diff) | |
download | op-kernel-dev-0112721df4edbdd07b800813300d76811572f080.zip op-kernel-dev-0112721df4edbdd07b800813300d76811572f080.tar.gz |
IMA: policy can be updated zero times
Commit "IMA: policy can now be updated multiple times" assumed that the
policy would be updated at least once.
If there are zero updates, the temporary list head object will get added
to the policy list, and later dereferenced as an IMA policy object, which
means that invalid memory will be accessed.
Changelog:
- Move list_empty() test to ima_release_policy(), before audit msg - Mimi
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Diffstat (limited to 'security/integrity/ima/ima.h')
-rw-r--r-- | security/integrity/ima/ima.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h index 917407f..585af61 100644 --- a/security/integrity/ima/ima.h +++ b/security/integrity/ima/ima.h @@ -166,6 +166,7 @@ void ima_update_policy(void); void ima_update_policy_flag(void); ssize_t ima_parse_add_rule(char *); void ima_delete_rules(void); +int ima_check_policy(void); void *ima_policy_start(struct seq_file *m, loff_t *pos); void *ima_policy_next(struct seq_file *m, void *v, loff_t *pos); void ima_policy_stop(struct seq_file *m, void *v); |