Skip to content

Commit

Permalink
rsi: avoid format string leak to thread name
Browse files Browse the repository at this point in the history
Since the rsi_create_kthread interface does not include any format
string arguments, make sure that the resulting thread name can never
accidentally process the name as a format string.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Kees Cook authored and John W. Linville committed May 29, 2014
1 parent a5eb1ae commit d6755bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/rsi/rsi_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ static inline int rsi_create_kthread(struct rsi_common *common,
u8 *name)
{
init_completion(&thread->completion);
thread->task = kthread_run(func_ptr, common, name);
thread->task = kthread_run(func_ptr, common, "%s", name);
if (IS_ERR(thread->task))
return (int)PTR_ERR(thread->task);

Expand Down

0 comments on commit d6755bd

Please sign in to comment.