From: Kees Cook Date: Tue, 10 Jun 2014 18:10:03 +0000 (-0700) Subject: staging: r8192ee: avoid leaking format string X-Git-Tag: v3.17-rc1~123^2~1701 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=037526f1ae7eeff5cf27ad790ebfe30303eeebe8;p=linux.git staging: r8192ee: avoid leaking format string This makes sure a format string cannot leak into the work queue name nor the printk buffer. Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman --- 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 { \