public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: r8821ae: avoid leaking format string
@ 2014-07-10 20:16 Kees Cook
  2014-07-10 20:38 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Kees Cook @ 2014-07-10 20:16 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, devel, John W. Linville

This make sure a format string cannot leak into the work queue name nor
the printk buffer.

Signed-off-by: Kees Cook <keescook@chromium.org>
---
This is the third time this set of macros has entered the kernel:

drivers/net/wireless/rtlwifi/btcoexist/halbtcoutsrc.h
drivers/staging/rtl8192ee/btcoexist/halbtcoutsrc.h
drivers/staging/rtl8821ae/btcoexist/halbtcoutsrc.h

Can we extract these macros to some common place and keep them from returning?
---
 drivers/staging/rtl8821ae/btcoexist/halbtcoutsrc.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8821ae/btcoexist/halbtcoutsrc.h b/drivers/staging/rtl8821ae/btcoexist/halbtcoutsrc.h
index 787798e76217..fd233cc85a5b 100644
--- a/drivers/staging/rtl8821ae/btcoexist/halbtcoutsrc.h
+++ b/drivers/staging/rtl8821ae/btcoexist/halbtcoutsrc.h
@@ -88,7 +88,7 @@ extern u32 btc_dbg_type[];
 
 
 #define	CL_SPRINTF	snprintf
-#define	CL_PRINTF	printk
+#define	CL_PRINTF(buf)	printk("%s", buf)
 
 #define	BTC_PRINT(dbgtype, dbgflag, printstr, ...)		\
 	do { 							\
-- 
1.7.9.5


-- 
Kees Cook
Chrome OS Security

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-10 20:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-10 20:16 [PATCH] staging: r8821ae: avoid leaking format string Kees Cook
2014-07-10 20:38 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox