lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 29 Jun 2010 11:45:14 +0300
From:	Alexey Dobriyan <adobriyan@...il.com>
To:	Kees Cook <kees.cook@...onical.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	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

On Tue, Jun 29, 2010 at 12:03 AM, Kees Cook <kees.cook@...onical.com> wrote:
> 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.

It also fills not just any buffer but buffer which is TASK_COMM_LEN byte wide.

> Why should get_task_comm not take a destination buffer length argument?

If you pass too small, you needlessly truncate output.
If you pass too large, you waste space.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ