# CVE-2021-47412: block: don't call rq_qos_ops->done_bio if the bio isn't tracked

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.23%, higher than 15% of CVEs (2026-12-01)
- Published: 2024-05-21T15:04:03.309Z
- Modified: 2026-08-05T08:47:43.235Z
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In 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()

Fix the potential kernel panic by not calling rq_qos_ops->done_bio if
the bio isn't tracked. This way is safe because both ioc_rqos_done_bio()
and blkcg_iolatency_done_bio() are nop if the bio isn't tracked.

(As written by CVE List.)

## Affected

- Linux Linux: from 67b42d0bf7a8fd1ec0cf1acdc9550e688d7c8578 before db60edbfff332a6a5477c367af8125f034570989; from 67b42d0bf7a8fd1ec0cf1acdc9550e688d7c8578 before 004b8f8a691205a93d9e80d98b786b2b97424d6e; from 67b42d0bf7a8fd1ec0cf1acdc9550e688d7c8578 before a647a524a46736786c95cdb553a070322ca096e3; 4.19 (not affected: before 4.19; from 5.10.241 up to 5.10.*; from 5.14.11 up to 5.14.*; from 5.15 up to *)
- linux linux_kernel: before 5.10.241; from 5.11 before 5.14.11; 5.15

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/db60edbfff332a6a5477c367af8125f034570989> (patch)
- <https://git.kernel.org/stable/c/004b8f8a691205a93d9e80d98b786b2b97424d6e> (patch)
- <https://git.kernel.org/stable/c/a647a524a46736786c95cdb553a070322ca096e3> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html>

## Sources

- CVE List: [CVE-2021-47412](https://www.cve.org/CVERecord?id=CVE-2021-47412), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2021-47412](https://nvd.nist.gov/vuln/detail/CVE-2021-47412), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2021-47412 · Whole record: https://cve.day/CVE-2021-47412.json · Rebuilt by cve.day 2026-11-25T22:58:08.844Z
