Explorar o código

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

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Kees Cook %!s(int64=11) %!d(string=hai) anos
pai
achega
50b66dbf87
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      arch/powerpc/xmon/nonstdio.c

+ 1 - 1
arch/powerpc/xmon/nonstdio.c

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