Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Kees Cook and committed by
John W. Linville
d6755bd4 a5eb1aeb

+1 -1
+1 -1
drivers/net/wireless/rsi/rsi_common.h
··· 63 63 u8 *name) 64 64 { 65 65 init_completion(&thread->completion); 66 - thread->task = kthread_run(func_ptr, common, name); 66 + thread->task = kthread_run(func_ptr, common, "%s", name); 67 67 if (IS_ERR(thread->task)) 68 68 return (int)PTR_ERR(thread->task); 69 69