Patchwork Fix kernel information leak with print-fatal-signals=1

login
register
mail settings
Submitter Andi Kleen
Date Dec. 25, 2009, 8:29 p.m.
Message ID <20091225202956.GA23141@basil.fritz.box>
Download mbox | patch
Permalink /patch/69752/
State New, archived
Headers show

Comments

Patch

Index: linux-2.6.33-rc1-ak/kernel/signal.c
===================================================================
--- linux-2.6.33-rc1-ak.orig/kernel/signal.c
+++ linux-2.6.33-rc1-ak/kernel/signal.c
@@ -979,7 +979,8 @@  static void print_fatal_signal(struct pt
 		for (i = 0; i < 16; i++) {
 			unsigned char insn;
 
-			__get_user(insn, (unsigned char *)(regs->ip + i));
+			if (get_user(insn, (unsigned char *)(regs->ip + i)))
+				break;
 			printk("%02x ", insn);
 		}
 	}