projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3752e45
)
powerpc/xmon: avoid format string leaking to printk
author
Kees Cook
<keescook@chromium.org>
Tue, 10 Jun 2014 17:54:06 +0000
(10:54 -0700)
committer
Benjamin Herrenschmidt
<benh@kernel.crashing.org>
Wed, 11 Jun 2014 07:04:03 +0000
(17:04 +1000)
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>
arch/powerpc/xmon/nonstdio.c
patch
|
blob
|
history
diff --git
a/arch/powerpc/xmon/nonstdio.c
b/arch/powerpc/xmon/nonstdio.c
index bce3dcfe50583440f09e7229e08305559acc12f9..c98748617896b18c697f589de4089c635e87a1cc 100644
(file)
--- 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);
}
}