block: don't call rq_qos_ops->done_bio if the bio isn't tracked
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
5.10.2415.14.115.15In the Linux kernel, the following vulnerability has been resolved:
block: don't call rq_qos_ops->done_bio if the bio isn't tracked
rq_qos framework is only applied on request based driver, so:
1) rq_qos_done_bio() needn't to be called for bio based driver
2) rq_qos_done_bio() needn't to be called for bio which isn't tracked, such as bios ended from error handling code.
Especially in bio_endio():
1) request queue is referred via bio->bi_bdev->bd_disk->queue, which may be gone since request queue refcount may not be held in above two cases
2) q->rq_qos may be freed in blk_cleanup_queue() when calling into __rq_qos_done_bio()
From the CVE record · Linux
The Linux kernel's block layer can call rq_qos completion handling for a bio that is not tracked, potentially accessing a request queue or rq_qos data that has been freed and causing a kernel panic. This can occur during bio completion, including error handling. The input does not establish whether an attacker can trigger it or whether network access, authentication, or user interaction is required.
Operators running the Linux kernel should check their version; affected versions are not specified in the input.