]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
staging/rtl8821ae: avoid format string leak to thread name
authorKees Cook <keescook@chromium.org>
Thu, 22 May 2014 18:57:16 +0000 (11:57 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 May 2014 12:33:51 +0000 (21:33 +0900)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8821ae/base.c

index a4c9cc437bc6e3d1d64d285fc573651b70add311..49ee311ddcd90b179d4d81fd413561ca44aa75a5 100644 (file)
@@ -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);