Skip to contentSkip to conversation

staging/rtl8821ae: avoid format string leak to thread name

PATCH New Kees Cook 1 participant 1 message May 22, 2014 Staging

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 staging/rtl8821ae: avoid format string leak to thread name

This makes sure the cfg->name can never accidentally be processed as a format string in the worker thread name.

---
 drivers/staging/rtl8821ae/base.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/rtl8821ae/base.c +2 -1
index a4c9cc437bc6..49ee311ddcd9 100644
@@ -404,7 +404,8 @@ static int _rtl_init_deferred_work(struct ieee80211_hw *hw)
 /*<delete in kernel start>*/
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37))
 /*<delete in kernel end>*/
-	rtlpriv->works.rtl_wq = alloc_workqueue(rtlpriv->cfg->name, 0, 0);
+	rtlpriv->works.rtl_wq = alloc_workqueue("%s", 0, 0,
+						rtlpriv->cfg->name);
 /*<delete in kernel start>*/
 #else
 	rtlpriv->works.rtl_wq = create_workqueue(rtlpriv->cfg->name);
Signature · 6 lines
1.7.9.5


-- 
Kees Cook
Chrome OS Security