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

Published May 21, 2024
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

block: don't call rqqosops->donebio if the bio isn't tracked

rqqos framework is only applied on request based driver, so:

1) rqqosdonebio() needn't to be called for bio based driver

2) rqqosdonebio() needn't to be called for bio which isn't tracked, such as bios ended from error handling code.

Especially in bioendio():

1) request queue is referred via bio->bibdev->bddisk->queue, which may be gone since request queue refcount may not be held in above two cases

2) q->rqqos may be freed in blkcleanupqueue() when calling into rqqosdonebio()

Fix the potential kernel panic by not calling rqqosops->donebio if the bio isn't tracked. This way is safe because both iocrqosdonebio() and blkcgiolatencydonebio() are nop if the bio isn't tracked.

Other sources

In the Linux kernel, the following vulnerability has been resolved:

block: don't call rqqosops->donebio if the bio isn't tracked

The Linux kernel CVE team has assigned CVE-2021-47412 to this issue.

Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024052152-CVE-2021-47412-b362@gregkh/T

— Red Hat

Affected Software

100 affected componentsFixes available
redhat/kernel<5.14.11
5.14.11
redhat/kernel<5.15
5.15
Linux Linux kernel<5.10.241
Linux Linux kernel>=5.11<5.14.11
Linux Linux kernel=5.15-rc1
Linux Linux kernel=5.15-rc2
ubuntu/linux-hwe-edge*
ubuntu/linux-aws-5.0*
ubuntu/linux-aws-5.3*
ubuntu/linux-aws-5.4*
ubuntu/linux-azure*
ubuntu/linux-azure-5.3*
ubuntu/linux-azure-5.4*
ubuntu/linux-azure-edge*
ubuntu/linux-gcp*
ubuntu/linux-gcp-5.3*
ubuntu/linux-gcp-5.4*
ubuntu/linux-gke-4.15*
ubuntu/linux-gke-5.4*
ubuntu/linux-gkeop-5.4*
ubuntu/linux-hwe*
ubuntu/linux-hwe-5.4*
ubuntu/linux-hwe-edge*
ubuntu/linux-ibm-5.4*
ubuntu/linux-oem*
ubuntu/linux-oracle-5.0*
ubuntu/linux-oracle-5.3*
ubuntu/linux-oracle-5.4*
ubuntu/linux-raspi-5.4*
ubuntu/linux*
ubuntu/linux-aws*
ubuntu/linux-aws-5.11*
ubuntu/linux-aws-5.13*
ubuntu/linux-aws-5.8*
ubuntu/linux-azure*
ubuntu/linux-azure-5.11*
ubuntu/linux-azure-5.13*
ubuntu/linux-azure-5.8*
ubuntu/linux-azure-fde*
ubuntu/linux-bluefield*
ubuntu/linux-gcp*
ubuntu/linux-gcp-5.11*
ubuntu/linux-gcp-5.13*
ubuntu/linux-gcp-5.8*
ubuntu/linux-gke*
ubuntu/linux-gke-5.15*
ubuntu/linux-gkeop*
ubuntu/linux-hwe-5.11*
ubuntu/linux-hwe-5.13*
ubuntu/linux-hwe-5.8*
ubuntu/linux-ibm*
ubuntu/linux-intel-5.13*
ubuntu/linux-iot*
ubuntu/linux-kvm*
ubuntu/linux-oem-5.10*
ubuntu/linux-oem-5.13*
ubuntu/linux-oem-5.6*
ubuntu/linux-oracle*
ubuntu/linux-oracle-5.11*
ubuntu/linux-oracle-5.13*
ubuntu/linux-oracle-5.8*
ubuntu/linux-raspi*
ubuntu/linux-raspi2*
ubuntu/linux-riscv*
ubuntu/linux-riscv-5.11*
ubuntu/linux-riscv-5.8*
ubuntu/linux-xilinx-zynqmp*
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux-allwinner-5.19*
ubuntu/linux-aws-5.19*
ubuntu/linux-aws-6.2*
ubuntu/linux-azure-5.19*
ubuntu/linux-azure-6.2*
ubuntu/linux-azure-fde-5.19*
ubuntu/linux-azure-fde-6.2*
ubuntu/linux-gcp-5.19*
ubuntu/linux-gcp-6.2*
ubuntu/linux-hwe-5.19*
ubuntu/linux-hwe-6.2*
ubuntu/linux-intel-iot-realtime*
ubuntu/linux-lowlatency-hwe-5.19*
ubuntu/linux-lowlatency-hwe-6.2*
ubuntu/linux-nvidia-6.2*
ubuntu/linux-oem-5.17*
ubuntu/linux-oem-6.0*
ubuntu/linux-oem-6.1*
ubuntu/linux-realtime*
ubuntu/linux-riscv*
ubuntu/linux-riscv-5.19*
ubuntu/linux-starfive-5.19*
ubuntu/linux-starfive-6.2*
ubuntu/linux-raspi-realtime*
ubuntu/linux-vmware*

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 5.14.11
  2. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 5.15
  3. Compensating control

    In the Linux kernel block layer, do not call rq_qos_ops->done_bio (including __rq_qos_done_bio()) for bios that are not tracked, including bios from bio-based drivers and bios ended from error-handling code.

Event History

May 21, 2024
CVE Published
via MITRE·03:04 PM
Data Sourced
via MITRE·03:04 PM
DescriptionSeverity
Data Sourced
via OSV·03:15 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·03:15 PM
RemedyDescriptionSeverityAffected Software
May 22, 2024
Data Sourced
via Red Hat·08:25 AM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2021-47412?

CVE-2021-47412 has a medium severity rating due to its potential impact on data processing in specific kernel functions.

2

How do I fix CVE-2021-47412?

To remediate CVE-2021-47412, update the Linux kernel to version 5.14.11 or later.

3

What versions of the Linux kernel are affected by CVE-2021-47412?

CVE-2021-47412 affects Linux kernel versions up to 5.14.10 and includes specific release candidates.

4

Is CVE-2021-47412 a remote exploit vulnerability?

CVE-2021-47412 is not classified as a remote exploit vulnerability but may affect local system operations.

5

What systems are primarily impacted by CVE-2021-47412?

CVE-2021-47412 primarily impacts systems running vulnerable versions of the Linux kernel on request based drivers.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203