summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorMike Rapoport <rppt@linux.vnet.ibm.com>2018-01-17 20:27:11 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-03 17:38:53 +0100
commit516868c59d82705b7c636ec2bdd3d6cb0e989b06 (patch)
tree819590bb7350f4c3197418b2003c1948c0d83c42 /security
parent80baea0e6cf36f64905fd7d50b4fe2fe846b6a4a (diff)
downloadlinux-stable-516868c59d82705b7c636ec2bdd3d6cb0e989b06.tar.gz
linux-stable-516868c59d82705b7c636ec2bdd3d6cb0e989b06.tar.bz2
linux-stable-516868c59d82705b7c636ec2bdd3d6cb0e989b06.zip
ima/policy: fix parsing of fsuuid
commit 36447456e1cca853188505f2a964dbbeacfc7a7a upstream. The switch to uuid_t invereted the logic of verfication that &entry->fsuuid is zero during parsing of "fsuuid=" rule. Instead of making sure the &entry->fsuuid field is not attempted to be overwritten, we bail out for perfectly correct rule. Fixes: 787d8c530af7 ("ima/policy: switch to use uuid_t") Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'security')
-rw-r--r--security/integrity/ima/ima_policy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c
index 95209a5f8595..8daf16e1d421 100644
--- a/security/integrity/ima/ima_policy.c
+++ b/security/integrity/ima/ima_policy.c
@@ -743,7 +743,7 @@ static int ima_parse_rule(char *rule, struct ima_rule_entry *entry)
case Opt_fsuuid:
ima_log_string(ab, "fsuuid", args[0].from);
- if (uuid_is_null(&entry->fsuuid)) {
+ if (!uuid_is_null(&entry->fsuuid)) {
result = -EINVAL;
break;
}