blk-mq: don't touch ->tagset in blk_mq_get_sq_hctx
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 |
|
|
In the Linux kernel, the following vulnerability has been resolved:
blk-mq: don't touch ->tagset in blk_mq_get_sq_hctx
blk_mq_run_hw_queues() could be run when there isn't queued request and after queue is cleaned up, at that time tagset is freed, because tagset lifetime is covered by driver, and often freed after blk_cleanup_queue() returns.
So don't touch ->tagset for figuring out current default hctx by the mapping built in request queue, so use-after-free on tagset can be avoided. Meantime this way should be fast than retrieving mapping from tagset.
From the CVE record · Linux
The Linux kernel's blk-mq code can access a freed tagset if hardware queues run after a request queue has been cleaned up. The input does not establish how an attacker could trigger this condition or whether it requires local access, authentication, or user interaction.
Engineers running the Linux kernel should check whether their kernel includes the fix; affected versions are not specified.