From: Kees Cook Date: Tue, 10 Jun 2014 17:54:06 +0000 (-0700) Subject: powerpc/xmon: avoid format string leaking to printk X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=50b66dbf876a10e35604fe325dc307811fb17a1b;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Signed-off-by: Benjamin Herrenschmidt --- diff --git a/arch/powerpc/xmon/nonstdio.c b/arch/powerpc/xmon/nonstdio.c index bce3dcfe5058..c98748617896 100644 --- a/arch/powerpc/xmon/nonstdio.c +++ b/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); } }