Security
Headlines
HeadlinesLatestCVEs

Headline

CVE-2021-3929: hw/nvme: fix CVE-2021-3929 (736b0164) · Commits · QEMU / QEMU · GitLab

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 nvme_ctrl_reset(), 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.

CVE
#dos#git#auth

Commit 736b0164 authored Dec 17, 2021 by 🍻

Browse files

  • Changes 1

@@ -357,6 +357,24 @@ static inline void *nvme_addr_to_pmr(NvmeCtrl *n, hwaddr addr)

return memory_region_get_ram_ptr(&n->pmr.dev->mr) + (addr - n->pmr.cba);

}

static inline bool nvme_addr_is_iomem(NvmeCtrl *n, hwaddr addr)

{

hwaddr hi, lo;

/*

* The purpose of this check is to guard against invalid “local” access to

* the iomem (i.e. controller registers). Thus, we check against the range

* covered by the ‘bar0’ MemoryRegion since that is currently composed of

* two subregions (the NVMe “MBAR” and the MSI-X table/pba). Note, however,

* that if the device model is ever changed to allow the CMB to be located

* in BAR0 as well, then this must be changed.

*/

lo = n->bar0.addr;

hi = lo + int128_get64(n->bar0.size);

return addr >= lo && addr < hi;

}

static int nvme_addr_read(NvmeCtrl *n, hwaddr addr, void *buf, int size)

{

hwaddr hi = addr + size - 1;

@@ -614,6 +632,10 @@ static uint16_t nvme_map_addr(NvmeCtrl *n, NvmeSg *sg, hwaddr addr, size_t len)

trace_pci_nvme_map_addr(addr, len);

if (nvme_addr_is_iomem(n, addr)) {

return NVME_DATA_TRAS_ERROR;

}

if (nvme_addr_is_cmb(n, addr)) {

cmb = true;

} else if (nvme_addr_is_pmr(n, addr)) {

  • mentioned in issue #782 (closed)

    mentioned in issue #782

Related news

Gentoo Linux Security Advisory 202208-27

Gentoo Linux Security Advisory 202208-27 - Multiple vulnerabilities have been discovered in QEMU, the worst of which could result in remote code execution (guest sandbox escape). Versions less than 7.0.0 are affected.

Ubuntu Security Notice USN-5489-1

Ubuntu Security Notice 5489-1 - Alexander Bulekov discovered that QEMU incorrectly handled floppy disk emulation. A privileged attacker inside the guest could use this issue to cause QEMU to crash, resulting in a denial of service, or possibly leak sensitive information. It was discovered that QEMU incorrectly handled NVME controller emulation. An attacker inside the guest could use this issue to cause QEMU to crash, resulting in a denial of service, or possibly execute arbitrary code. This issue only affected Ubuntu 22.04 LTS.

CVE: Latest News

CVE-2023-50976: Transactions API Authorization by oleiman · Pull Request #14969 · redpanda-data/redpanda
CVE-2023-6905
CVE-2023-6903
CVE-2023-6904
CVE-2023-3907