]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ima: Call audit_log_string() rather than logging it untrusted
authorStefan Berger <stefanb@linux.vnet.ibm.com>
Mon, 4 Jun 2018 20:54:52 +0000 (16:54 -0400)
committerMimi Zohar <zohar@linux.vnet.ibm.com>
Wed, 18 Jul 2018 11:27:22 +0000 (07:27 -0400)
The parameters passed to this logging function are all provided by
a privileged user and therefore we can call audit_log_string()
rather than audit_log_untrustedstring().

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Suggested-by: Steve Grubb <sgrubb@redhat.com>
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
security/integrity/ima/ima_policy.c

index 1659abb344f976fc2c7d7f115fbb072d9d3566d9..f457684690039dd6ac8eda66c947bb7f6c1a1feb 100644 (file)
@@ -663,7 +663,7 @@ static void ima_log_string_op(struct audit_buffer *ab, char *key, char *value,
                audit_log_format(ab, "%s<", key);
        else
                audit_log_format(ab, "%s=", key);
-       audit_log_untrustedstring(ab, value);
+       audit_log_string(ab, value);
        audit_log_format(ab, " ");
 }
 static void ima_log_string(struct audit_buffer *ab, char *key, char *value)