Bug 1894657 (CVE-2020-28049)

Summary: CVE-2020-28049 sddm: local privilege escalation due to race condition in creation of the Xauthority file
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: high Docs Contact:
Priority: high    
Version: unspecifiedCC: jgrulich, kde-sig, me, m, pierluigi.fiorini, rdieter
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-11-04 20:21:44 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: 1894658, 1894659    
Bug Blocks:    

Description Guilherme de Almeida Suckevicz 2020-11-04 17:36:08 UTC
sddm passes the -auth and -displayfd command line arguments when
starting the Xserver. It then waits for the display number to be
received from the Xserver via the `displayfd`, before the Xauthority
file specified via the `-auth` parameter is actually written. This
results in a race condition, creating a time window in which no valid
Xauthority file is existing while the Xserver is already running.

The X.Org server, when encountering a non-existing, empty or
corrupt/incomplete Xauthority file, will grant any connecting client
access to the Xorg display [2]. A local unprivileged attacker can thus
create an unauthorized connection to the Xserver and grab e.g. keyboard
input events from other legitimate users accessing the Xserver.

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

Comment 1 Guilherme de Almeida Suckevicz 2020-11-04 17:36:26 UTC
Created sddm tracking bugs for this issue:

Affects: epel-all [bug 1894659]
Affects: fedora-all [bug 1894658]

Comment 2 Product Security DevOps Team 2020-11-04 20:21:44 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.