staging: r8192ee: avoid leaking format string
authorKees Cook <keescook@chromium.org>
Tue, 10 Jun 2014 18:10:03 +0000 (11:10 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Jun 2014 00:14:45 +0000 (17:14 -0700)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192ee/base.c
drivers/staging/rtl8192ee/btcoexist/halbtcoutsrc.h

index 64ade216a153e28a2d1e818259cba8758e3e16b7..a7c69f704623bfccc7662884f765dd8dd3a38983 100644 (file)
@@ -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,
index c0a4286430a5ca676cab79819c2e1d8e9f70fa9c..1231b16205f2c0ef6a0165be714ae5530688408f 100644 (file)
@@ -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 {                                                    \