lkml.org 
[lkml]   [2010]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sanitize task->comm to avoid leaking escape codes
Hi,

On Mon, Jun 28, 2010 at 01:00:28PM -0700, Andrew Morton wrote:
> Surely it would be better to fix the tools which display this info
> rather than making the kernel tell fibs.

The strncpy in get_task_comm() is totally wrong -- it's testing the length
of task->comm. Why should get_task_comm not take a destination buffer
length argument? At least consider v2 of the patch -- it just fixes the
get_task_comm definition and callers.

But, if not, then patches to the kernel that include
printk(..., get_task_comm(...) ...) shouldn't be considered flawed[1].

-Kees

[1] http://lkml.org/lkml/2010/6/23/132

--
Kees Cook
Ubuntu Security Team


\
 
 \ /
  Last update: 2010-06-28 23:07    [W:0.155 / U:2.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site