From: David Woodhouse Date: Mon, 23 May 2005 20:57:41 +0000 (+0100) Subject: AUDIT: Escape comm when logging task info X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=99e45eeac867d51ff3395dcf3d7aedf5ac2812c8;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git AUDIT: Escape comm when logging task info It comes from the user; it needs to be escaped. Signed-off-by: David Woodhouse --- diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 5fc4f52d218f..b45677eba78f 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c @@ -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;