Bug 2494104 - CVE-2026-57965 spice-vdagent: Integer overflow in udscs_write() leading to heap buffer overflow [fedora-all]
Summary: CVE-2026-57965 spice-vdagent: Integer overflow in udscs_write() leading to he...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: spice-vdagent
Version: 45
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Christophe Fergeau
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: {"flaws": ["0082a46a-438a-4e16-8abe-b...
Depends On:
Blocks: CVE-2026-57965
TreeView+ depends on / blocked
 
Reported: 2026-06-29 07:56 UTC by Mauro Matteo Cascella
Modified: 2026-08-17 15:01 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mauro Matteo Cascella 2026-06-29 07:56:13 UTC
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.

An integer overflow vulnerability was found in spice-vdagent. In src/udscs.c, the udscs_write() function computes a buffer size as buf_size = sizeof(header) + size, where buf_size 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. g_malloc(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 >= min_size 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.

Comment 1 Aoife Moloney 2026-08-17 15:01:26 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 45 development cycle.
Changing version to 45.


Note You need to log in before you can comment on or make changes to this bug.