* [PATCH] staging/rtl8821ae: avoid format string leak to thread name
@ 2014-05-22 18:57 Kees Cook
0 siblings, 0 replies; only message in thread
From: Kees Cook @ 2014-05-22 18:57 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, Gulsah Kose, Larry Finger, Paul E. McKenney,
John W. Linville, Jingoo Han, devel
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@chromium.org>
---
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-05-22 18:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-22 18:57 [PATCH] staging/rtl8821ae: avoid format string leak to thread name 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®