Bug 1992830 (CVE-2021-3700)

Summary: CVE-2021-3700 usbredir: use-after-free in usbredirparser_serialize() in usbredirparser/usbredirparser.c
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: cfergeau, erik-fedora, hdegoede, jjongsma, marcandre.lureau, rh-spice-bugs, victortoso, virt-maint
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: usbredir 0.11.0 Doc Type: If docs needed, set a value
Doc Text:
A use-after-free vulnerability was found in usbredir in the usbredirparser_serialize() function in usbredirparser/usbredirparser.c . This issue occurs when serializing large amounts of buffered write data in the case of a slow or blocked destination.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1992831, 1992832, 1992871, 1992872, 1992873    
Bug Blocks: 1992164, 1992833    

Description Guilherme de Almeida Suckevicz 2021-08-11 19:12:44 UTC
An use-after-free vulnerability was found in usbredir in versions prior to 0.11.0 in usbredirparser_serialize() in usbredirparser/usbredirparser.c when serializing large amounts of buffered write data in case of a slow or blocked destination.

Reference and upstream patch:
https://gitlab.freedesktop.org/spice/usbredir/-/commit/03c519ff5831ba

Comment 1 Guilherme de Almeida Suckevicz 2021-08-11 19:13:15 UTC
Created mingw-usbredir tracking bugs for this issue:

Affects: fedora-all [bug 1992832]


Created usbredir tracking bugs for this issue:

Affects: fedora-all [bug 1992831]

Comment 2 Garrett Tucker 2021-08-11 21:26:22 UTC
This use after free vulnerability is caused by serializing large amounts of write data. The pointer for a necessary buffer will briefly point to a location outside the buffer. During heavy load, or blocks the data is serialized. An attacker can not control the state while this is occurring. The attacker would also have to ensure that the write buffers are primed for this exploit to work. After the extensive setup, there is a small window of time where a possibly useful value could be written. Depending on the value written, this could lead to affects on Confidentiality, Integrity and Availability of the system.