Linux kernel NULL pointer dereference in workqueue chained-work check
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 8d03ecfe471802d6afe97da97722b6924533aa82 · < b12a25fb2b9d5dac80e419d695450cc17a51fdfd| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
workqueue: Fix NULL current_pwq deref in chained work check
current_wq_worker() only tells us that %current is a kworker. It does not guarantee that the worker is currently executing a work item, as worker->current_pwq is populated only while process_one_work() is running the work function.
is_chained_work() can be reached while queueing on a draining or destroying workqueue. If a kworker outside work-item execution reaches that path, current_wq_worker() returns a worker but worker->current_pwq is NULL, and the chained-work test can fault before it emits the intended warning.
Guard the chained-work test with worker->current_pwq. A kworker without current_pwq is not executing work on the target workqueue, so the helper should return false and let the draining/destroying warning fire.
From the CVE record · Linux
The Linux kernel’s workqueue chained-work check can dereference a NULL pointer. This can happen when a kworker that is not executing a work item queues work on a draining or destroying workqueue, causing a fault before the intended warning appears. The input does not specify an attacker path, authentication requirement, or user interaction.
Engineers running the Linux kernel should check their versions; affected versions are not specified.