REDHAT-BUG-2493581: Buffer Overflow
An integer overflow vulnerability was found in spice-vdagent. In src/udscs.c, the udscswrite() function computes a buffer size as bufsize = sizeof(header) + size, where bufsize is a guint (unsigned 32-bit). When size is >= 0xFFFFFFF1 (since sizeof(header) is 16), this addition wraps to zero or a very small value. gmalloc(0) returns a valid tiny allocation (typically 1 byte), and the subsequent memcpy(buf + 16, data, size) writes approximately 4GB past the end of the buffer, causing a heap buffer overflow. This has been confirmed with AddressSanitizer (heap-buffer-overflow). On a normal (non-ASAN) build the daemon crashes with SIGBUS.
The trigger path is through VDAgentMessage.size in clipboard or file transfer messages from the SPICE host. The size validation at vdagentd.c:572 only checks >= minsize with no upper bound.
Note: exploitation requires a malicious or compromised SPICE host to send a crafted message with a large size field. In standard SPICE deployments, the host is trusted.
Affected Software
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2493581?
The severity of REDHAT-BUG-2493581 is classified as medium with a score of 4.
What type of vulnerability is REDHAT-BUG-2493581?
REDHAT-BUG-2493581 is identified as an integer overflow vulnerability.
What software is affected by REDHAT-BUG-2493581?
The affected software for REDHAT-BUG-2493581 is spice-vdagent.
How do I fix REDHAT-BUG-2493581?
To fix REDHAT-BUG-2493581, ensure you update spice-vdagent to a version that addresses this vulnerability.
What potential impact does REDHAT-BUG-2493581 pose?
REDHAT-BUG-2493581 could lead to buffer overflow issues due to the integer overflow in the udscs_write() function.