In the Linux kernel, the following vulnerability has been resolved: coredump: hold RCU while releasing parked threads coredump_finish() releases the parked threads by clearing ->task in their core_thread entry and calling wake_up_process() on each of them. Он делает это без ссылки на задачу и без нахождения внутри rcu. Но звонить wake_up_process(task без rcu здесь небезопасно.
Припаркованная нить не нуждается в пробуждении, чтобы уйти. Ложного пробуждения или упреждения после магазина достаточно, чтобы задача исчезла. Таким образом, если клиент coredump упрежден между хранилищем и wake_up_process (), поток может выйти и освободиться, а try_to_wake_up () принимает pi_lock в свободной памяти.
Держите rcu через петлю.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: coredump: hold RCU while releasing parked threads coredump_finish() releases the parked threads by clearing ->task in their core_thread entry and calling wake_up_process() on each of them. It does that without holding a reference on the task and without being inside rcu. But calling wake_up_process(task) without rcu here isn't safe. A parked thread doesn't need that wakeup to leave. A spurious wakeup or a preemption after the store is enough for the task to go away. So if the coredump client is preempted between the store and wake_up_process() the thread can exit and be freed in the meantime and try_to_wake_up() takes pi_lock in freed memory. Hold rcu across the loop.
Характеристики атаки
Последствия
Строка CVSS v3.1