Thread (7 messages) 7 messages, 5 authors, 2020-03-17

Re: [PATCH 1/2] cpufreq/powernv: Fix use-after-free

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2020-02-27 01:33:08

Andrew Donnellan [off-list ref] writes:
On 6/2/20 5:26 pm, Oliver O'Halloran wrote:
quoted
The cpufreq driver has a use-after-free that we can hit if:

a) There's an OCC message pending when the notifier is registered, and
b) The cpufreq driver fails to register with the core.

When a) occurs the notifier schedules a workqueue item to handle the
message. The backing work_struct is located on chips[].throttle and when b)
happens we clean up by freeing the array. Once we get to the (now free)
queued item and the kernel crashes.

Cc: Vaidyanathan Srinivasan <redacted>
Fixes: c5e29ea ("cpufreq: powernv: Fix bugs in powernv_cpufreq_{init/exit}")
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
This sounds like it needs to go to stable.
I tagged it for stable when applying.

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help