CVE-2021-3748: Use After Free

Published Aug 27, 2021
·
Updated

A use-after-free vulnerability was found in the virtio-net device of QEMU. It could occur when the descriptor's address belongs to the non direct access region, due to numbuffers being set after the virtqueue elem has been unmapped. A malicious guest could use this flaw to crash QEMU, resulting in a denial of service condition, or potentially execute code on the host with the privileges of the QEMU process.

Other sources

OSS-Fuzz found a use-after-free vulnerability in virtio-net. It occurs in the virtionetreceivercu function (hw/net/virtio-net.c) under these conditions:

1) the (malicious) driver tries to add a non direct memory region as the buffer address 2) then memory core needs to use the bounce buffer 3) virtio-net tries to set the numbuffers after the iov is unmapped (bounce buffer is freed)

A malicious guest could use this flaw to crash QEMU, resulting in a denial of service condition, or potentially execute code on the host with the privileges of the QEMU process.

Upstream patch & commit: https://lists.nongnu.org/archive/html/qemu-devel/2021-09/msg00388.html https://gitlab.com/qemu-project/qemu/-/commit/bedd7e93d01961fcb16a97ae45d93acf357e11f6

Red Hat

Affected Software

11 affected componentsFixes available
redhat/qemu-kvm<6.2.0
6.2.0
Qemu Qemu>=0.10.0<6.2.0
Debian Debian Linux=9.0
Debian Debian Linux=10.0
Canonical Ubuntu Linux=18.04
Canonical Ubuntu Linux=20.04
Canonical Ubuntu Linux=21.10
Fedoraproject Fedora=34
redhat Enterprise Linux=8.0
redhat Enterprise Linux Advanced Virtualization Eus=8.4
debian/qemu
1:5.2+dfsg-11+deb11u31:5.2+dfsg-11+deb11u51:7.2+dfsg-7+deb12u181:7.2+dfsg-7+deb12u151:10.0.7+ds-0+deb13u11:10.0.2+ds-2+deb13u11:10.2.1+ds-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

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

    Fixed in 1:5.2+dfsg-11+deb11u3Fixed in 1:5.2+dfsg-11+deb11u5Fixed in 1:7.2+dfsg-7+deb12u18Fixed in 1:7.2+dfsg-7+deb12u15Fixed in 1:10.0.7+ds-0+deb13u1Fixed in 1:10.0.2+ds-2+deb13u1Fixed in 1:10.2.1+ds-1
  2. Upgrade

    Upgrade redhat/qemu-kvm to a version that resolves this vulnerability.

    Fixed in 6.2.0
  3. Upgrade

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

    Fixed in 1:5.2+dfsg-11+deb11u3
  4. Upgrade

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

    Fixed in 1:5.2+dfsg-11+deb11u5
  5. Upgrade

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

    Fixed in 1:7.2+dfsg-7+deb12u18
  6. Upgrade

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

    Fixed in 1:7.2+dfsg-7+deb12u15
  7. Upgrade

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

    Fixed in 1:10.0.7+ds-0+deb13u1
  8. Upgrade

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

    Fixed in 1:10.0.2+ds-2+deb13u1
  9. Upgrade

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

    Fixed in 1:10.2.1+ds-1
  10. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch bedd7e93d01961fcb16a97ae45d93acf357e11f6

Event History

Aug 27, 2021
Data Sourced
via Red Hat·12:54 PM
DescriptionSeverityAffected Software
Aug 31, 2021
Data Sourced
07:39 PM
SeverityAffected Software
Mar 23, 2022
CVE Published
via MITRE·07:46 PM
Data Sourced
via MITRE·07:46 PM
DescriptionWeakness
Jan 11, 2024
Data Sourced
via Launchpad·11:58 PM
Description
Feb 24, 2026
Data Sourced
via Ubuntu·09:17 PM
RemedyDescriptionSeverityAffected Software
Data Sourced
via Debian·09:18 PM
DescriptionAffected Software

Frequently Asked Questions

1

What is the vulnerability ID for this use-after-free vulnerability?

The vulnerability ID for this use-after-free vulnerability is CVE-2021-3748.

2

What is the severity level of CVE-2021-3748?

The severity level of CVE-2021-3748 is high with a severity value of 7.5.

3

Which software is affected by CVE-2021-3748?

The affected software includes QEMU, qemu-kvm, Debian Linux, Ubuntu Linux, Fedora, and Red Hat Enterprise Linux.

4

How can a malicious guest exploit CVE-2021-3748?

A malicious guest can exploit CVE-2021-3748 to crash QEMU by causing a use-after-free vulnerability in the virtio-net device.

5

Where can I find more information about CVE-2021-3748?

You can find more information about CVE-2021-3748 on the QEMU mailing list and GitLab repositories.

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