block, bfq: fix uaf for accessing waker_bfqq after splitting
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 42c306ed723321af4003b2a41bb73728cab54f85 · < 1ba0403ac6447f2d63914fb760c44a3b19c44eaf| No fix yet |
| Linux Linux | — | No fix yet |
In the Linux kernel, the following vulnerability has been resolved:
block, bfq: fix uaf for accessing waker_bfqq after splitting
After commit 42c306ed7233 ("block, bfq: don't break merge chain in bfq_split_bfqq()"), if the current procress is the last holder of bfqq, the bfqq can be freed after bfq_split_bfqq(). Hence recored the bfqq and then access bfqq->waker_bfqq may trigger UAF. What's more, the waker_bfqq may in the merge chain of bfqq, hence just recored waker_bfqq is still not safe.
Fix the problem by adding a helper bfq_waker_bfqq() to check if bfqq->waker_bfqq is in the merge chain, and current procress is the only holder.
From the CVE record · Linux
The Linux kernel's BFQ block scheduler can access a freed queue after splitting it. This can occur when the current process is the queue's last holder; the input does not establish whether an attacker can trigger it or what they could achieve.
Engineers running Linux kernels that include the affected BFQ code should check their versions; no affected version range is provided.