CVE-2022-2962: High severity qemu vulnerability

Published Aug 23, 2022
·
Updated

A DMA reentrancy issue was found in the Tulip device emulation in QEMU. When Tulip reads or writes to the rx/tx descriptor or copies the rx/tx frame, it doesn't check whether the destination address is its own MMIO address. This can cause the device to trigger MMIO handlers multiple times, possibly leading to a stack or heap overflow. A malicious guest could use this flaw to crash the QEMU process on the host, resulting in a denial of service condition.

Other sources

When tulip reads or writes to the rx/tx descriptor or copies the rx/tx frame, it doesn't check whether the destination address is its own MMIO address. So crafted content can cause the device to trigger MMIO handlers again to modify some global variables and cause stack or heap overflow.

-- [ QEMU command line:

./qemu-system-x8664 -machine type=q35,accel=qtest -nodefaults -device tulip -qtest stdio -nographic

-- [ POC:

outl 0xcf8 0x80000804 / PCICMD—PCI Command Register / outl 0xcfc 0x107 / Enables accesses/ outl 0xcf8 0x80000814 / Memory Bar 1/ outl 0xcfc 0xfebf1000 / Set MMIO Address to 0xfebf1000/ writel 0xfebf1000 0 / tulipreset / writel 0xfebf1030 0x2001 / set csr6 flags CSR6ST|CSR6SR / writel 0xfebf1020 0xfebf1008 / set currenttxdesc to its MMIO address,and trigger tulipdescwrite /

-- [ Analysis

(1) setting s->currentrxdesc to tulip MMIO address + CSR(1). (2) Then tulipxmitlistupdate was executed, and tulipdescwrite wrote a descriptor to its MMIO address+CSR(1). (3) Tulipxmitlistupdate was called again. Then,(2)(3) was executed thousands of times until the stack overflowed.

I found that the same problem could occur in tulipreceive (it can be called by mmio write) and may cause heap overflow: (1) In tulipcopyrxbytes set s->currentrxdesc to its mmio address + CSR(1) via pcidmawrite, then s->rxframelen is set to 0. (2) When tulipdescwrite executes, another tulipreceive is called, s->rxframelen can be set to a big value. (3) But the first tulipreceive does not end,and s->rxframelen is bigger than s->rxframesize, so tulipcopyrxbytes causes heap overflow.

-- [ Reporter Siqi Chen (Shanghai Jiaotong University)

Red Hat

Affected Software

3 affected componentsFixes available
redhat/qemu<7.2.0
7.2.0
Qemu Qemu>=4.2.0<=7.1.0
debian/qemu
1:5.2+dfsg-11+deb11u31:5.2+dfsg-11+deb11u21:7.2+dfsg-7+deb12u121:10.0.0~rc3+ds-2

Event History

Sep 13, 2022
CVE Published
via MITRE·07:18 PM
Data Sourced
via MITRE·07:18 PM
DescriptionWeakness
Data Sourced
via NVD·08:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jan 12, 2024
Data Sourced
via Launchpad·12:08 AM
Description
Sep 16, 2024
Data Sourced
via Ubuntu·01:48 AM
RemedyDescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the vulnerability ID?

The vulnerability ID is CVE-2022-2962.

2

What is the severity of CVE-2022-2962?

The severity of CVE-2022-2962 is high with a CVSS score of 7.8.

3

What is the affected software?

The affected software includes QEMU versions 1:7.0+dfsg-7ubuntu2.1, 7.2.0, and versions between 4.2.0 and 7.1.0, as well as various Debian versions.

4

How does the vulnerability in Tulip device emulation in QEMU manifest?

The vulnerability in Tulip device emulation in QEMU allows the device to trigger MMIO handlers multiple times, potentially leading to arbitrary code execution or denial of service.

5

Are there any references for more information about CVE-2022-2962?

Yes, you can find more information about CVE-2022-2962 at the following references: [Link 1](https://gitlab.com/qemu-project/qemu/-/commit/36a894aeb64a2e02871016da1c37d4a4ca109182), [Link 2](https://gitlab.com/qemu-project/qemu/-/issues/1171), [Link 3](https://launchpad.net/bugs/cve/CVE-2022-2962).

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