* [PATCH] staging: r8192ee: avoid leaking format string
@ 2014-06-10 18:10 Kees Cook
0 siblings, 0 replies; only message in thread
From: Kees Cook @ 2014-06-10 18:10 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, Gulsah Kose, Larry Finger, Paul E. McKenney,
John W. Linville, devel
This makes sure a format string cannot leak into the work queue name nor
the printk buffer.
Signed-off-by: Kees Cook <keescook@chromium.org>
---
drivers/staging/rtl8192ee/base.c | 2 +-
drivers/staging/rtl8192ee/btcoexist/halbtcoutsrc.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8192ee/base.c b/drivers/staging/rtl8192ee/base.c
index 64ade216a153..a7c69f704623 100644
--- a/drivers/staging/rtl8192ee/base.c
+++ b/drivers/staging/rtl8192ee/base.c
@@ -469,7 +469,7 @@ static void _rtl_init_deferred_work(struct ieee80211_hw *hw)
rtl92e_easy_concurrent_retrytimer_callback, (unsigned long)hw);
/* <2> work queue */
rtlpriv->works.hw = hw;
- rtlpriv->works.rtl_wq = alloc_workqueue(rtlpriv->cfg->name, 0, 0);
+ rtlpriv->works.rtl_wq = alloc_workqueue("%s", 0, 0, rtlpriv->cfg->name);
INIT_DELAYED_WORK(&rtlpriv->works.watchdog_wq,
(void *)rtl92e_watchdog_wq_callback);
INIT_DELAYED_WORK(&rtlpriv->works.ips_nic_off_wq,
diff --git a/drivers/staging/rtl8192ee/btcoexist/halbtcoutsrc.h b/drivers/staging/rtl8192ee/btcoexist/halbtcoutsrc.h
index c0a4286430a5..1231b16205f2 100644
--- a/drivers/staging/rtl8192ee/btcoexist/halbtcoutsrc.h
+++ b/drivers/staging/rtl8192ee/btcoexist/halbtcoutsrc.h
@@ -94,7 +94,7 @@ extern u32 btc_92edbg_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 [flat|nested] only message in thread
only message in thread, other threads:[~2014-06-10 18:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-10 18:10 [PATCH] staging: r8192ee: avoid leaking format string Kees Cook
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®