[PATCH] staging/rtl8821ae: avoid format string leak to thread name
From: Kees Cook
Date: Thu May 22 2014 - 14:57:45 EST
This makes sure the cfg->name can never accidentally be processed as a
format string in the worker thread name.
Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx>
---
drivers/staging/rtl8821ae/base.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8821ae/base.c b/drivers/staging/rtl8821ae/base.c
index a4c9cc437bc6..49ee311ddcd9 100644
--- a/drivers/staging/rtl8821ae/base.c
+++ b/drivers/staging/rtl8821ae/base.c
@@ -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);
--
1.7.9.5
--
Kees Cook
Chrome OS Security
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/