virtio-blk: fix implicit overflow on virtio_max_dma_size
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
virtio-blk: fix implicit overflow on virtio_max_dma_size
The following codes have an implicit conversion from size_t to u32: (u32)max_size = (size_t)virtio_max_dma_size(vdev);
This may lead overflow, Ex (size_t)4G -> (u32)0. Once virtio_max_dma_size() has a larger size than U32_MAX, use U32_MAX instead.
From the CVE record · Linux
The Linux kernel’s virtio-blk code implicitly converts the size returned by virtio_max_dma_size() from size_t to u32. If that size exceeds U32_MAX, the conversion can overflow, potentially turning a 4 GiB value into zero. The input does not specify an attacker action or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with virtio-blk should check whether their kernel is affected; affected versions are not specified.