Skip to content

Commit

Permalink
staging/rtl8821ae: avoid format string leak to thread name
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
kees authored and gregkh committed May 23, 2014
1 parent 4b9708e commit 6fdb1f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/staging/rtl8821ae/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6fdb1f4

Please sign in to comment.