Netdev List
 help / color / mirror / Atom feed
* [PATCH] rtlwifi: btcoexist: avoid format string in printk
@ 2014-06-10 17:37 Kees Cook
  0 siblings, 0 replies; 2+ messages in thread
From: Kees Cook @ 2014-06-10 17:37 UTC (permalink / raw)
  To: linux-kernel
  Cc: Larry Finger, Chaoming Li, John W. Linville, Kees Cook,
	Greg Kroah-Hartman, linux-wireless, netdev

Since CL_PRINTF only ever takes a single argument, make sure a format
string cannot leak into printk.

Signed-off-by: Kees Cook <keescook@chromium.org>
---
 .../net/wireless/rtlwifi/btcoexist/halbtcoutsrc.h  |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/rtlwifi/btcoexist/halbtcoutsrc.h b/drivers/net/wireless/rtlwifi/btcoexist/halbtcoutsrc.h
index 871fc3c6d559..049f4c8d98a8 100644
--- a/drivers/net/wireless/rtlwifi/btcoexist/halbtcoutsrc.h
+++ b/drivers/net/wireless/rtlwifi/btcoexist/halbtcoutsrc.h
@@ -114,7 +114,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
* [PATCH] rtlwifi: btcoexist: avoid format string in printk
@ 2014-09-12  0:02 Larry Finger
  0 siblings, 0 replies; 2+ messages in thread
From: Larry Finger @ 2014-09-12  0:02 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Larry Finger, netdev, Kees Cook

Recent changes to this driver inadvertently reverted the change made by Kees
Cook in commit 6437f51ec3.

Reported-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Kees Cook <keescook@chromium.org>
---
 drivers/net/wireless/rtlwifi/btcoexist/halbtcoutsrc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/rtlwifi/btcoexist/halbtcoutsrc.h b/drivers/net/wireless/rtlwifi/btcoexist/halbtcoutsrc.h
index 0d185e6..3cd2175 100644
--- a/drivers/net/wireless/rtlwifi/btcoexist/halbtcoutsrc.h
+++ b/drivers/net/wireless/rtlwifi/btcoexist/halbtcoutsrc.h
@@ -117,7 +117,7 @@ extern u32 btc_dbg_type[];
 #define		WIFI_P2P_GC_CONNECTED			BIT4
 
 #define	CL_SPRINTF	snprintf
-#define	CL_PRINTF	printk
+#define	CL_PRINTF(buf)	printk("%s", buf)
 
 #define	BTC_PRINT(dbgtype, dbgflag, printstr, ...)		\
 	do {							\
-- 
1.8.4.5

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

end of thread, other threads:[~2014-09-12  0:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-10 17:37 [PATCH] rtlwifi: btcoexist: avoid format string in printk Kees Cook
  -- strict thread matches above, loose matches on Subject: below --
2014-09-12  0:02 Larry Finger

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