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] [day] [month] [year] [list]
Date:	Tue, 16 Jun 2009 12:13:36 -0400 (EDT)
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Roel Kluin <roel.kluin@...il.com>
cc:	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] tracing: Keep index within map_pid_to_cmdline[]



On Tue, 16 Jun 2009, Roel Kluin wrote:

> Ensure that index `pid' remains within array map_pid_to_cmdline[]
> 
> Signed-off-by: Roel Kluin <roel.kluin@...il.com>
> ---
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index 8acd9b8..f359e9e 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -803,7 +803,7 @@ void trace_find_cmdline(int pid, char comm[])
>  		return;
>  	}
>  
> -	if (pid > PID_MAX_DEFAULT) {
> +	if (pid > PID_MAX_DEFAULT || pid < 0) {
>  		strcpy(comm, "<...>");
>  		return;
>  	}

Did you ever hit a case where pid was < 0? Or is this just a "safety 
patch"?

-- Steve

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