CVE-2021-3348: Race Condition

Published Jan 28, 2021
·
Updated

A flaw was found in the Linux kernel. A race codition in nbd ioctl may lead to a use-after-free read in nbdqueuerq causing a crash.

Upstream patch:

https://lore.kernel.org/linux-block/24dff677353e2e30a71d8b66c4dffdbdf77c4dbd.1611595239.git.josef@toxicpanda.com/

References:

https://www.openwall.com/lists/oss-security/2021/01/28/3

Other sources

nbdaddsocket in drivers/block/nbd.c in the Linux kernel through 5.10.12 has an ndbqueuerq use-after-free that could be triggered by local attackers (with access to the nbd device) via an I/O request at a certain point during device setup, aka CID-b98e762e3d71.

— Launchpad

Affected Software

73 affected componentsFixes available
Linux Linux kernel<=5.10.12
Debian Debian Linux=9.0
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.25-16.12.27-1
ubuntu/linux-azure<4.15.0-1112.124~14.04.1
4.15.0-1112.124~14.04.1
ubuntu/linux-aws-hwe<4.15.0-1098.105~16.04.1
4.15.0-1098.105~16.04.1
ubuntu/linux-azure<4.15.0-1112.124~16.04.1
4.15.0-1112.124~16.04.1
ubuntu/linux-gcp<4.15.0-1097.110~16.04.1
4.15.0-1097.110~16.04.1
ubuntu/linux-hwe<4.15.0-142.146~16.04.1
4.15.0-142.146~16.04.1
ubuntu/linux-oracle<4.15.0-1069.77~16.04.1
4.15.0-1069.77~16.04.1
ubuntu/linux-hwe-edge*
ubuntu/linux<4.15.0-141.145
4.15.0-141.145
ubuntu/linux-aws<4.15.0-1098.105
4.15.0-1098.105
ubuntu/linux-aws-5.4<5.4.0-1043.45~18.04.1
5.4.0-1043.45~18.04.1
ubuntu/linux-azure-4.15<4.15.0-1112.125
4.15.0-1112.125
ubuntu/linux-azure-5.4<5.4.0-1044.46~18.04.1
5.4.0-1044.46~18.04.1
ubuntu/linux-dell300x<4.15.0-1016.20
4.15.0-1016.20
ubuntu/linux-gcp-4.15<4.15.0-1097.110
4.15.0-1097.110
ubuntu/linux-gcp-5.4<5.4.0-1041.44~18.04.1
5.4.0-1041.44~18.04.1
ubuntu/linux-gke-5.4<5.4.0-1040.42~18.04.1
5.4.0-1040.42~18.04.1
ubuntu/linux-gkeop-5.4<5.4.0-1013.14~18.04.1
5.4.0-1013.14~18.04.1
ubuntu/linux-hwe-5.4<5.4.0-71.79~18.04.1
5.4.0-71.79~18.04.1
ubuntu/linux-kvm<4.15.0-1089.91
4.15.0-1089.91
ubuntu/linux-oracle<4.15.0-1069.77
4.15.0-1069.77
ubuntu/linux-oracle-5.4<5.4.0-1042.45~18.04.1
5.4.0-1042.45~18.04.1
ubuntu/linux-raspi-5.4<5.4.0-1033.36~18.04.1
5.4.0-1033.36~18.04.1
ubuntu/linux-raspi2<4.15.0-1083.88
4.15.0-1083.88
ubuntu/linux-snapdragon<4.15.0-1100.109
4.15.0-1100.109
ubuntu/linux-aws-5.0*
ubuntu/linux-aws-5.3*
ubuntu/linux-azure*
ubuntu/linux-azure-5.3*
ubuntu/linux-azure-edge*
ubuntu/linux-gcp*
ubuntu/linux-gcp-5.3*
ubuntu/linux-gcp-edge*
ubuntu/linux-gke-4.15*
ubuntu/linux-hwe*
ubuntu/linux-hwe-edge*
ubuntu/linux-oem*
ubuntu/linux-oracle-5.0*
ubuntu/linux-oracle-5.3*
ubuntu/linux-aws-fips<4.15.0-2041.43
4.15.0-2041.43
ubuntu/linux-azure-fips<4.15.0-2024.27
4.15.0-2024.27
ubuntu/linux-fips<4.15.0-1057.65
4.15.0-1057.65
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux<5.4.0-71.79
5.4.0-71.79
ubuntu/linux-aws<5.4.0-1043.45
5.4.0-1043.45
ubuntu/linux-azure<5.4.0-1044.46
5.4.0-1044.46
ubuntu/linux-gcp<5.4.0-1041.44
5.4.0-1041.44
ubuntu/linux-gke<5.4.0-1041.43
5.4.0-1041.43
ubuntu/linux-gkeop<5.4.0-1013.14
5.4.0-1013.14
ubuntu/linux-hwe-5.8<5.8.0-49.55~20.04.1
5.8.0-49.55~20.04.1
ubuntu/linux-kvm<5.4.0-1037.38
5.4.0-1037.38
ubuntu/linux-oem-5.10<5.10.0-1017.18
5.10.0-1017.18
ubuntu/linux-oracle<5.4.0-1042.45
5.4.0-1042.45
ubuntu/linux-raspi<5.4.0-1033.36
5.4.0-1033.36
ubuntu/linux-riscv-5.8<5.8.0-22.24~20.04.1
5.8.0-22.24~20.04.1
ubuntu/linux-oem-5.6*
ubuntu/linux-raspi2*
ubuntu/linux-riscv*
ubuntu/linux-aws-fips<5.4.0-1069.73+fips2
5.4.0-1069.73+fips2
ubuntu/linux-azure-fips<5.4.0-1073.76+fips1
5.4.0-1073.76+fips1
ubuntu/linux-gcp-fips<5.4.0-1067.71~20.04.1
5.4.0-1067.71~20.04.1
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux-intel-iot-realtime*
ubuntu/linux-realtime*
ubuntu/linux-raspi-realtime*
ubuntu/linux-vmware*

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1Fixed in 6.12.27-1
  2. Upgrade

    Upgrade ubuntu/linux-azure to a version that resolves this vulnerability.

    Fixed in 4.15.0-1112.124~14.04.1
  3. Upgrade

    Upgrade ubuntu/linux-aws-hwe to a version that resolves this vulnerability.

    Fixed in 4.15.0-1098.105~16.04.1
  4. Upgrade

    Upgrade ubuntu/linux-azure to a version that resolves this vulnerability.

    Fixed in 4.15.0-1112.124~16.04.1
  5. Upgrade

    Upgrade ubuntu/linux-gcp to a version that resolves this vulnerability.

    Fixed in 4.15.0-1097.110~16.04.1
  6. Upgrade

    Upgrade ubuntu/linux-hwe to a version that resolves this vulnerability.

    Fixed in 4.15.0-142.146~16.04.1
  7. Upgrade

    Upgrade ubuntu/linux-oracle to a version that resolves this vulnerability.

    Fixed in 4.15.0-1069.77~16.04.1
  8. Upgrade

    Upgrade ubuntu/linux to a version that resolves this vulnerability.

    Fixed in 4.15.0-141.145
  9. Upgrade

    Upgrade ubuntu/linux-aws to a version that resolves this vulnerability.

    Fixed in 4.15.0-1098.105
  10. Upgrade

    Upgrade ubuntu/linux-aws-5.4 to a version that resolves this vulnerability.

    Fixed in 5.4.0-1043.45~18.04.1
  11. Upgrade

    Upgrade ubuntu/linux-azure-4.15 to a version that resolves this vulnerability.

    Fixed in 4.15.0-1112.125
  12. Upgrade

    Upgrade ubuntu/linux-azure-5.4 to a version that resolves this vulnerability.

    Fixed in 5.4.0-1044.46~18.04.1
  13. Upgrade

    Upgrade ubuntu/linux-dell300x to a version that resolves this vulnerability.

    Fixed in 4.15.0-1016.20
  14. Upgrade

    Upgrade ubuntu/linux-gcp-4.15 to a version that resolves this vulnerability.

    Fixed in 4.15.0-1097.110
  15. Upgrade

    Upgrade ubuntu/linux-gcp-5.4 to a version that resolves this vulnerability.

    Fixed in 5.4.0-1041.44~18.04.1
  16. Upgrade

    Upgrade ubuntu/linux-gke-5.4 to a version that resolves this vulnerability.

    Fixed in 5.4.0-1040.42~18.04.1
  17. Upgrade

    Upgrade ubuntu/linux-gkeop-5.4 to a version that resolves this vulnerability.

    Fixed in 5.4.0-1013.14~18.04.1
  18. Upgrade

    Upgrade ubuntu/linux-hwe-5.4 to a version that resolves this vulnerability.

    Fixed in 5.4.0-71.79~18.04.1
  19. Upgrade

    Upgrade ubuntu/linux-kvm to a version that resolves this vulnerability.

    Fixed in 4.15.0-1089.91
  20. Upgrade

    Upgrade ubuntu/linux-oracle to a version that resolves this vulnerability.

    Fixed in 4.15.0-1069.77
  21. Upgrade

    Upgrade ubuntu/linux-oracle-5.4 to a version that resolves this vulnerability.

    Fixed in 5.4.0-1042.45~18.04.1
  22. Upgrade

    Upgrade ubuntu/linux-raspi-5.4 to a version that resolves this vulnerability.

    Fixed in 5.4.0-1033.36~18.04.1
  23. Upgrade

    Upgrade ubuntu/linux-raspi2 to a version that resolves this vulnerability.

    Fixed in 4.15.0-1083.88
  24. Upgrade

    Upgrade ubuntu/linux-snapdragon to a version that resolves this vulnerability.

    Fixed in 4.15.0-1100.109
  25. Upgrade

    Upgrade ubuntu/linux-aws-fips to a version that resolves this vulnerability.

    Fixed in 4.15.0-2041.43
  26. Upgrade

    Upgrade ubuntu/linux-azure-fips to a version that resolves this vulnerability.

    Fixed in 4.15.0-2024.27
  27. Upgrade

    Upgrade ubuntu/linux-fips to a version that resolves this vulnerability.

    Fixed in 4.15.0-1057.65
  28. Upgrade

    Upgrade ubuntu/linux to a version that resolves this vulnerability.

    Fixed in 5.4.0-71.79
  29. Upgrade

    Upgrade ubuntu/linux-aws to a version that resolves this vulnerability.

    Fixed in 5.4.0-1043.45
  30. Upgrade

    Upgrade ubuntu/linux-azure to a version that resolves this vulnerability.

    Fixed in 5.4.0-1044.46
  31. Upgrade

    Upgrade ubuntu/linux-gcp to a version that resolves this vulnerability.

    Fixed in 5.4.0-1041.44
  32. Upgrade

    Upgrade ubuntu/linux-gke to a version that resolves this vulnerability.

    Fixed in 5.4.0-1041.43
  33. Upgrade

    Upgrade ubuntu/linux-gkeop to a version that resolves this vulnerability.

    Fixed in 5.4.0-1013.14
  34. Upgrade

    Upgrade ubuntu/linux-hwe-5.8 to a version that resolves this vulnerability.

    Fixed in 5.8.0-49.55~20.04.1
  35. Upgrade

    Upgrade ubuntu/linux-kvm to a version that resolves this vulnerability.

    Fixed in 5.4.0-1037.38
  36. Upgrade

    Upgrade ubuntu/linux-oem-5.10 to a version that resolves this vulnerability.

    Fixed in 5.10.0-1017.18
  37. Upgrade

    Upgrade ubuntu/linux-oracle to a version that resolves this vulnerability.

    Fixed in 5.4.0-1042.45
  38. Upgrade

    Upgrade ubuntu/linux-raspi to a version that resolves this vulnerability.

    Fixed in 5.4.0-1033.36
  39. Upgrade

    Upgrade ubuntu/linux-riscv-5.8 to a version that resolves this vulnerability.

    Fixed in 5.8.0-22.24~20.04.1
  40. Upgrade

    Upgrade ubuntu/linux-aws-fips to a version that resolves this vulnerability.

    Fixed in 5.4.0-1069.73+fips2
  41. Upgrade

    Upgrade ubuntu/linux-azure-fips to a version that resolves this vulnerability.

    Fixed in 5.4.0-1073.76+fips1
  42. Upgrade

    Upgrade ubuntu/linux-gcp-fips to a version that resolves this vulnerability.

    Fixed in 5.4.0-1067.71~20.04.1
  43. Upgrade

    Upgrade linux kernel to a version that resolves this vulnerability.

    Fixed in 5.10.12Patch CID-b98e762e3d71
  44. Compensating control

    If local attackers have access to the nbd device, restrict access to the nbd device to trusted users/hosts (e.g., tighten device node permissions and/or control who can issue I/O requests to the /dev/nbd* device).

Event History

Jan 28, 2021
Data Sourced
via Red Hat·11:52 PM
DescriptionSeverityAffected Software
Feb 1, 2021
CVE Published
via MITRE·03:43 AM
Data Sourced
via MITRE·03:43 AM
Description
Data Sourced
via OSV·04:15 AM
DescriptionSeverityAffected Software
Data Sourced
via NVD·04:15 AM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2021-3348?

CVE-2021-3348 has been classified as a moderate severity vulnerability.

2

How do I fix CVE-2021-3348?

To fix CVE-2021-3348, upgrade to a kernel version that is 5.10.223-1 or later, or 6.1.119-1 or later.

3

What systems are affected by CVE-2021-3348?

CVE-2021-3348 affects Linux Kernel versions up to and including 5.10.12 and Debian Linux version 9.0.

4

What type of vulnerability is CVE-2021-3348?

CVE-2021-3348 is a use-after-free vulnerability due to a race condition in the nbd ioctl.

5

Can CVE-2021-3348 lead to system crashes?

Yes, CVE-2021-3348 can lead to a system crash due to a use-after-free read in nbd_queue_rq.

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