drivers: avoid parsing names as kthread_run() format strings
Calling kthread_run with a single name parameter causes it to be handled as a format string. Many callers are passing potentially dynamic string content, so use "%s" in those cases to avoid any potential accidents. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
此提交包含在:
@@ -753,7 +753,7 @@ static int ivtv_init_struct1(struct ivtv *itv)
|
||||
|
||||
init_kthread_worker(&itv->irq_worker);
|
||||
itv->irq_worker_task = kthread_run(kthread_worker_fn, &itv->irq_worker,
|
||||
itv->v4l2_dev.name);
|
||||
"%s", itv->v4l2_dev.name);
|
||||
if (IS_ERR(itv->irq_worker_task)) {
|
||||
IVTV_ERR("Could not create ivtv task\n");
|
||||
return -1;
|
||||
|
新增問題並參考
封鎖使用者