Bug 1905639 (CVE-2020-29487)

Summary: CVE-2020-29487 xen: XAPI: guest-triggered excessive memory usage (XSA-354)
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: jforbes, m.a.young, robinlee.sysu, security-response-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-12-15 22:19:50 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: 1907997    
Bug Blocks: 1903644    

Description Guilherme de Almeida Suckevicz 2020-12-08 18:05:49 UTC
Certain xenstore keys provide feedback from the guest, and are therefore
watched by toolstack.  Specifically, keys are watched by xenopsd, and
data are forward via RPC through message-switch to xapi.

The watching logic in xenopsd sends one RPC update containing all data,
any time any single xenstore key is updated, and therefore has O(N^2)
time complexity.  Furthermore, message-switch retains recent (currently
128) RPC messages for diagnostic purposes, yielding O(M*N) space
complexity.

The quantity of memory a single guest can monopolise is bounded by
xenstored quota, but the quota is fairly large.  It is believed to be in
excess of 1G per malicious guest.

In practice this manifests as a host denial of service, either through
message-switch thrashing against swap, or OOM'ing entirely, depending on
dom0's configuration.

This series introduces quotas in xenopsd to limit the quantity of keys
which result in RPC traffic.

Comment 1 Guilherme de Almeida Suckevicz 2020-12-15 16:24:24 UTC
External References:

https://www.openwall.com/lists/oss-security/2020/12/15/11

Comment 2 Guilherme de Almeida Suckevicz 2020-12-15 16:24:39 UTC
Created xen tracking bugs for this issue:

Affects: fedora-all [bug 1907997]

Comment 3 Product Security DevOps Team 2020-12-15 22:19:50 UTC
This CVE Bugzilla entry is for community support informational purposes only as it does not affect a package in a commercially supported Red Hat product. Refer to the dependent bugs for status of those individual community products.