From: Stefan Berger Date: Mon, 4 Jun 2018 20:54:52 +0000 (-0400) Subject: ima: Call audit_log_string() rather than logging it untrusted X-Git-Tag: v4.19~394^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8a3bcaf6ecd37fee326cd30732192ef2a09e5b07;p=platform%2Fkernel%2Flinux-rpi.git ima: Call audit_log_string() rather than logging it untrusted 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 Suggested-by: Steve Grubb Acked-by: Paul Moore Signed-off-by: Mimi Zohar --- diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c index 1659abb..f457684 100644 --- a/security/integrity/ima/ima_policy.c +++ b/security/integrity/ima/ima_policy.c @@ -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)