Skip to contentSkip to conversation

powerpc/xmon: avoid format string leaking to printk

PATCH New Kees Cook 1 participant 1 message Jun 10, 2014 PowerPC

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 powerpc/xmon: avoid format string leaking to printk

This makes sure format strings cannot leak into printk (the string has already been correctly processed for format arguments).

---
 arch/powerpc/xmon/nonstdio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/xmon/nonstdio.c +1 -1
index bce3dcfe5058..c98748617896 100644
@@ -122,7 +122,7 @@ void xmon_printf(const char *format, ...)
 
 	if (n && rc == 0) {
 		/* No udbg hooks, fallback to printk() - dangerous */
-		printk(xmon_outbuf);
+		printk("%s", xmon_outbuf);
 	}
 }
 
Signature · 6 lines
1.7.9.5


-- 
Kees Cook
Chrome OS Security