Skip to content

Commit

Permalink
AUDIT: Escape comm when logging task info
Browse files Browse the repository at this point in the history
It comes from the user; it needs to be escaped.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
  • Loading branch information
David Woodhouse committed May 23, 2005
1 parent bccf6ae commit 99e45ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/auditsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,8 @@ static void audit_log_task_info(struct audit_buffer *ab)
struct vm_area_struct *vma;

get_task_comm(name, current);
audit_log_format(ab, " comm=%s", name);
audit_log_format(ab, " comm=");
audit_log_untrustedstring(ab, name);

if (!mm)
return;
Expand Down

0 comments on commit 99e45ee

Please sign in to comment.