Bug 1886345 (CVE-2020-25650)

Summary: CVE-2020-25650 spice-vdagent: memory DoS via arbitrary entries in active_xfers hash table
Product: [Other] Security Response Reporter: Mauro Matteo Cascella <mcascell>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: alon, cfergeau, hdegoede, marcandre.lureau, rh-spice-bugs, security-response-team, uril
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: spice-vdagent 0.21.0 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the way the spice-vdagentd daemon handled file transfers from the host system to the virtual machine. This flaw allows any unprivileged local guest user with access to the UNIX domain socket path `/run/spice-vdagentd/spice-vdagent-sock` to perform a memory denial of service for spice-vdagentd or other processes in the VM system. The highest threat from this vulnerability is to system availability.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-18 14:35:35 UTC 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: 1886415, 1894433    
Bug Blocks: 1882815    

Description Mauro Matteo Cascella 2020-10-08 09:01:10 UTC
The following flaw was reported by SUSE Security:

The `spice-vdagentd` maintains a hash map named `active_xfers` that maps `task_ids` to UNIX domain socket connections they belong to. These `task_ids`
refer to ongoing file transfers from the host to the virtual machine. An arbitrary client connected to `spice-vdagentd` via a UNIX domain socket can trigger an entry into this hash map, without the requirement that the client is associated with the currently active graphical session (function `do_agent_file_xfer_status`, specifically `vdagentd.c:1025`). There is no limit on the maximum amount of file transfers ongoing in parallel and there are no timeouts applied for a file transfer to be finished.

Therefore any unprivileged local user with access to the `/run/spice-vdagentd/spice-vdagent-sock` socket path can perform a memory denial-of-service by entering a large amount of entries into this hash map. The system might enter an out of memory situation, causing a denial-of-service for spice-vdagentd or even other processes in the system.

Comment 4 Mauro Matteo Cascella 2020-10-14 09:37:53 UTC
Acknowledgments:

Name: Matthias Gerstner (SUSE Security Team)

Comment 5 Mauro Matteo Cascella 2020-11-04 09:34:04 UTC
External References:

https://www.openwall.com/lists/oss-security/2020/11/04/1

Comment 6 Mauro Matteo Cascella 2020-11-04 09:34:40 UTC
Created spice-vdagent tracking bugs for this issue:

Affects: fedora-all [bug 1894433]

Comment 11 Product Security DevOps Team 2021-05-18 14:35:35 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2020-25650

Comment 12 errata-xmlrpc 2021-05-18 15:05:14 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:1791 https://access.redhat.com/errata/RHSA-2021:1791