Skip to content

Commit

Permalink
ima: Call audit_log_string() rather than logging it untrusted
Browse files Browse the repository at this point in the history
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 <[email protected]>
Suggested-by: Steve Grubb <[email protected]>
Acked-by: Paul Moore <[email protected]>
Signed-off-by: Mimi Zohar <[email protected]>
  • Loading branch information
stefanberger authored and Mimi Zohar committed Jul 18, 2018
1 parent 87ea584 commit 8a3bcaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/integrity/ima/ima_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8a3bcaf

Please sign in to comment.