summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-05-23 22:57:41 +0200
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-05-23 22:57:41 +0200
commit99e45eeac867d51ff3395dcf3d7aedf5ac2812c8 (patch)
tree6cad4f59214ed4563ddc189bc98f05d1e2b1a5cc /kernel
parentAUDIT: Unify auid reporting, put arch before syscall number (diff)
downloadlinux-99e45eeac867d51ff3395dcf3d7aedf5ac2812c8.tar.xz
linux-99e45eeac867d51ff3395dcf3d7aedf5ac2812c8.zip
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>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/auditsc.c3
1 files changed, 2 insertions, 1 deletions
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;