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:	Mon, 28 Jun 2010 13:00:28 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Alexey Dobriyan <adobriyan@...il.com>
Cc:	Oleg Nesterov <oleg@...hat.com>,
	Kees Cook <kees.cook@...onical.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 Wed, 23 Jun 2010 23:23:35 +0300
Alexey Dobriyan <adobriyan@...il.com> wrote:

> On Wed, Jun 23, 2010 at 09:41:45PM +0200, Oleg Nesterov wrote:
> > On 06/23, Kees Cook wrote:
>  
> > > -extern char *get_task_comm(char *to, struct task_struct *tsk);
> > > +#define get_task_comm(buf, task) get_task_comm_size(buf, sizeof(buf), task)
> > > +extern char *get_task_comm_size(char *to, size_t len, struct task_struct *tsk);
> > 
> > Oh, but this means that get_task_comm(ptr, task) doesn't work?
> 
> The number of users is so small, and everyone uses TASK_COMM_LEN,
> so maybe nothing should be done or "char buf[TASK_COMM_LEN]"?

Yup, it would take an act of wilful daftness to pass anything other
than a TASK_COMM_LEN array into get_task_comm().

I can't say I like the patch much - going in and altering a task's
comm[] behind its back seems fraught with all sorts of problems which I
can't immediately think of.  Do we corrupt (err, "fix")
/proc/pid/cmdline as well?

Surely it would be better to fix the tools which display this info
rather than making the kernel tell fibs.
--
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