Linux kernel use-after-free in coredump thread release
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ a94e2d408eaedbd85aae259621d46fafc10479a2 · < b0eca0edddf4c1dbaf6d1f6a8636b4235f5bc573| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel's coredump_finish() can access a freed task while waking parked threads because it does not hold RCU during that loop. The input does not specify an attacker action or whether exploitation requires network access, authentication, or user interaction.
Engineers running the Linux kernel should check their deployments; affected versions are not specified.