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-next>] [day] [month] [year] [list]
Date:	Tue, 16 Jun 2009 20:01:14 +0200
From:	Roel Kluin <roel.kluin@...il.com>
To:	rostedt@...dmis.org
CC:	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH] tracing: Keep index within map_pid_to_cmdline[]

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