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]
Message-ID: <55E5BF34.8080005@oracle.com>
Date:	Tue, 01 Sep 2015 11:07:32 -0400
From:	Sasha Levin <sasha.levin@...cle.com>
To:	Steven Rostedt <rostedt@...dmis.org>
CC:	mingo@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tracepoint: don't make assumptions about length of string
 on task rename

On 08/28/2015 11:02 AM, Steven Rostedt wrote:
> On Fri, 28 Aug 2015 07:06:58 -0400
> Sasha Levin <sasha.levin@...cle.com> wrote:
> 
>> While the dest comm string size is assured to be at least TASK_COMM_LEN long,
>> doing a memcpy() also adds the assumption that the source is at least that
>> long as well, which isn't assured, and isn't true in cases such as:
>>
>> 	set_task_comm(worker->task, "kworker/dying");
>>
>> This leads to accessing invalid memory.
>>
>> Signed-off-by: Sasha Levin <sasha.levin@...cle.com>
> 
> Acked-by: Steven Rostedt <rostedt@...dmis.org>
> 
> Should this go to stable as well?

Yup.

> Also, as the memcpy was just faster than a strcpy, the static length
> was used. Perhaps we should convert that to a dynamic length string.
> But that should be a separate patch as this one fixes a possible bug,
> and the conversion to a dynamic string is just an enhancement.

That'll slow things down for the common case, no?


Thanks,
Sasha

--
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