فهرست منبع

AUDIT: Escape comm when logging task info

It comes from the user; it needs to be escaped.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse 20 سال پیش
والد
کامیت
99e45eeac8
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      kernel/auditsc.c

+ 2 - 1
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;