CVE-2021-32845 Moby HyperKit uninitialized memory use vtrnd pci_vtrnd_notify

High 7.7 Published Updated

An attacker can crash the host or potentially execute code via uninitialized memory usage in HyperKit's PCI virtio notification handler.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
None listed

What is CVE-2021-32845?

CVE-2021-32845 is a high-severity memory corruption vulnerability in moby hyperkit, published on 17 Feb 2023. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

HyperKit is a toolkit for embedding hypervisor capabilities in an application. In versions 0.20210107 and prior of HyperKit, the implementation of `qnotify` at `pci_vtrnd_notify` fails to check the return value of `vq_getchain`. This leads to `struct iovec iov;` being uninitialized and used to read memory in `len = (int) read(sc->vrsc_fd, iov.iov_base, iov.iov_len);` when an attacker is able to make `vq_getchain` fail. This issue may lead to a guest crashing the host causing a denial of service and, under certain circumstance, memory corruption. This issue is fixed in commit 41272a980197917df8e58ff90642d14dec8fe948.

Weakness: CWE-252, CWE-908

Which versions are affected by CVE-2021-32845?

It affects 1 product.

Products include Mobyproject Hyperkit.

How do I fix CVE-2021-32845?

No fix has been published for CVE-2021-32845 yet. Limit exposure of the affected software until one is available.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2021-32845 being exploited?

There is no known exploitation of CVE-2021-32845 in the wild and no public exploit code.

Sources

Also known as GHSA-hpc3-58qp-h295.

Is CVE-2021-32845 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free