[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100628210342.GW4175@outflux.net>
Date: Mon, 28 Jun 2010 14:03:42 -0700
From: Kees Cook <kees.cook@...onical.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Alexey Dobriyan <adobriyan@...il.com>,
Oleg Nesterov <oleg@...hat.com>, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org,
Alexander Viro <viro@...iv.linux.org.uk>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Neil Horman <nhorman@...driver.com>,
Roland McGrath <roland@...hat.com>,
Ingo Molnar <mingo@...e.hu>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists