VMCI: Fix memcpy() run-time warning in dg_dispatch_as_host()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ a110b7ebb9c674a2b591af2780dd512ad0198d50 · < dae70a57565686f16089737adb8ac64471570f73| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
VMCI: Fix memcpy() run-time warning in dg_dispatch_as_host()
Syzkaller hit 'WARNING in dg_dispatch_as_host' bug.
memcpy: detected field-spanning write (size 56) of single field "&dg_info->msg" at drivers/misc/vmw_vmci/vmci_datagram.c:237 (size 24)
WARNING: CPU: 0 PID: 1555 at drivers/misc/vmw_vmci/vmci_datagram.c:237 dg_dispatch_as_host+0x88e/0xa60 drivers/misc/vmw_vmci/vmci_datagram.c:237
Some code commentry, based on my understanding:
544 #define VMCI_DG_SIZE(_dg) (VMCI_DG_HEADERSIZE + (size_t)(_dg)->payload_size) /// This is 24 + payload_size
memcpy(&dg_info->msg, dg, dg_size); Destination = dg_info->msg ---> this is a 24 byte structure(struct vmci_datagram) Source = dg --> this is a 24 byte structure (struct vmci_datagram) Size = dg_size = 24 + payload_size
From the CVE record · Linux
A memcpy() in the Linux kernel’s VMCI datagram dispatch can span the msg and msg_payload fields, triggering a runtime warning. Syzkaller reproduced the warning with a 32-byte datagram payload; the input does not establish an attacker access path or authentication requirements.
Engineers running Linux kernels with the VMCI component should check their exposure; affected versions are not specified.