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.
[
{
"signature_version": "v1",
"deprecated": false,
"source": "https://github.com/moby/hyperkit/commit/41272a980197917df8e58ff90642d14dec8fe948",
"signature_type": "Function",
"digest": {
"function_hash": "310043126656173523047379725801967880239",
"length": 495.0
},
"target": {
"function": "pci_vtrnd_notify",
"file": "src/lib/pci_virtio_rnd.c"
},
"id": "CVE-2021-32845-61f7972e"
},
{
"signature_version": "v1",
"deprecated": false,
"source": "https://github.com/moby/hyperkit/commit/41272a980197917df8e58ff90642d14dec8fe948",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"313427961420582974340249393305992632339",
"206001336668488359012814060866514161300",
"256515945538833497297681925219737940193",
"18215666424238618820492140631593916169",
"216513535212053987493370348725693915922",
"755233976114824510165496030115338788",
"80441343336273934510724666271259445792",
"339653611464416608273907080567137430736"
]
},
"target": {
"file": "src/lib/pci_virtio_rnd.c"
},
"id": "CVE-2021-32845-ef690adc"
}
]