CVE-2021-3929: Use After Free
A DMA reentrancy issue was found in the NVM Express Controller (NVME) emulation in QEMU. This CVE is similar to CVE-2021-3750 and, just like it, when the reentrancy write triggers the reset function nvmectrlreset(), data structs will be freed leading to a use-after-free issue. A malicious guest could use this flaw to crash the QEMU process on the host, resulting in a denial of service condition or, potentially, executing arbitrary code within the context of the QEMU process on the host.
Other sources
A DMA reentrancy issue was found in the NVM Express Controller emulation in QEMU. Functions dmabufwrite() or dmabufread() in hw/nvme/ctrl.c:nvmetx() can be called without checking if the destination region overlaps with device's MMIO. This flaw is similar to CVE-2021-3750 and just like CVE-2021-3750, when the reentrancy write triggers the reset function nvmectrlreset(), data structs will be freed leading to a use-after-free issue. This is easier to exploit, though, because the attacker can trigger the free operations precisely and the freed object contains a timer pointer that can be leveraged by the attacker. A malicious guest could use this issue to crash QEMU, resulting in a denial of service condition, or potentially execute arbitrary code within the context of the QEMU process on the host.
Upstream issues: https://gitlab.com/qemu-project/qemu/-/issues/782 https://gitlab.com/qemu-project/qemu/-/issues/556
— Red Hat
Affected Software
Remediation
Patch Available
Patch Available
Event History
Frequently Asked Questions
What is CVE-2021-3929?
CVE-2021-3929 is a DMA reentrancy issue found in the NVM Express Controller (NVME) emulation in QEMU.
How does CVE-2021-3929 affect QEMU?
CVE-2021-3929 can lead to a use-after-free issue in QEMU when the reentrancy write triggers the reset function nvme_ctrl_reset().
What is the severity of CVE-2021-3929?
CVE-2021-3929 has a severity rating of 8.2 (high).
Which software versions are affected by CVE-2021-3929?
QEMU versions 1:6.2+dfsg-2ubuntu6.2 (Ubuntu), 1:3.1+dfsg-8+deb10u8/1:3.1+dfsg-8+deb10u11 (Debian), 1:7.2+dfsg-7+deb12u2/1:8.1.1+ds-2/1:8.1.2+ds-1 (Debian), QEMU qemu 7.0.0 (CPE), Fedora 35 and Fedora 36 (Fedoraproject Fedora), and qemu-kvm 7.0.0 (Red Hat) are affected.
How can I fix CVE-2021-3929?
To fix CVE-2021-3929, users should update to the recommended software versions provided by their respective vendors.