]> git.baikalelectronics.ru Git - kernel.git/commit
x86: Pin task-stack in __get_wchan()
authorPeter Zijlstra <peterz@infradead.org>
Fri, 19 Nov 2021 09:29:47 +0000 (10:29 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 19 Nov 2021 18:14:57 +0000 (10:14 -0800)
commitdfa1eccc4987e37f03d6135e340c9cd80cbab4a6
tree35441c0586f737bccd7c8c85ec6b7cd493cd0128
parentd34f0cba072768cd6d63b710112d97b25c9be43b
x86: Pin task-stack in __get_wchan()

When commit 66afdad75432 ("x86: Fix __get_wchan() for !STACKTRACE")
moved from stacktrace to native unwind_*() usage, the
try_get_task_stack() got lost, leading to use-after-free issues for
dying tasks.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Fixes: 66afdad75432 ("x86: Fix __get_wchan() for !STACKTRACE")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=215031
Link: https://lore.kernel.org/stable/YZV02RCRVHIa144u@fedora64.linuxtx.org/
Reported-by: Justin Forbes <jmforbes@linuxtx.org>
Reported-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Cc: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/kernel/process.c