浏览代码

rsi: avoid format string leak to thread name

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>
Kees Cook 11 年之前
父节点
当前提交
d6755bd4fb
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/wireless/rsi/rsi_common.h

+ 1 - 1
drivers/net/wireless/rsi/rsi_common.h

@@ -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);