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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1209904761.4065.19.camel@johannes.berg>
Date:	Sun, 04 May 2008 14:39:21 +0200
From:	Johannes Berg <johannes@...solutions.net>
To:	Ingo Molnar <mingo@...hat.com>
Cc:	Linux Kernel list <linux-kernel@...r.kernel.org>
Subject: [PATCH] stacktrace: don't crash on invalid stack trace structs

This patch makes the stacktrace printout code warn when the entries
pointer is unset rather than crashing when trying to access it in an
attempt to make it a bit more robust.

Signed-off-by: Johannes Berg <johannes@...solutions.net>
---
I was saving a stacktrace into an skb and forgot to copy it across skb
copies... Not sure if you want this, I have since fixed the code, but it
would have been easier had the kernel not crashed in an interrupt.

--- everything.orig/kernel/stacktrace.c	2008-05-04 14:02:14.000000000 +0200
+++ everything/kernel/stacktrace.c	2008-05-04 14:02:24.000000000 +0200
@@ -13,6 +13,9 @@ void print_stack_trace(struct stack_trac
 {
 	int i, j;
 
+	if (WARN_ON(!trace->entries))
+		return;
+
 	for (i = 0; i < trace->nr_entries; i++) {
 		unsigned long ip = trace->entries[i];
 


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