* [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
* Re: [PATCH] staging: r8821ae: avoid leaking format string
2014-07-10 20:16 [PATCH] staging: r8821ae: avoid leaking format string Kees Cook
@ 2014-07-10 20:38 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2014-07-10 20:38 UTC (permalink / raw)
To: Kees Cook; +Cc: devel, linux-kernel, John W. Linville
On Thu, Jul 10, 2014 at 01:16:11PM -0700, Kees Cook wrote:
> 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?
I wish. These are all from the same company. Each new version of their
hardware consists of a whole dump of a wireless stack. People are
working on addressing this issue, by writing "real" drivers for the
hardware, and working with the company to not keep doing this. But odds
are, I'll get a new driver for the next chip from them that does the
same thing :(
thanks for the patch, I'll queue it up.
greg k-h
^ permalink raw reply [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