[lkml]   [2014]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] staging: r8821ae: avoid leaking format string
This make sure a format string cannot leak into the work queue name nor
the printk buffer.

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


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 { \

Kees Cook
Chrome OS Security

 \ /
  Last update: 2014-07-10 23:01    [W:0.025 / U:5.884 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site