Skip to content

Commit

Permalink
powerpc/xmon: avoid format string leaking to printk
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kees Cook authored and Benjamin Herrenschmidt committed Jun 11, 2014
1 parent 3752e45 commit 50b66db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/xmon/nonstdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 50b66db

Please sign in to comment.