Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 753104 (CVE-2020-28049) - x11-misc/sddm: Privilege escalation (CVE-2020-28049)
Summary: x11-misc/sddm: Privilege escalation (CVE-2020-28049)
Status: IN_PROGRESS
Alias: CVE-2020-28049
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Security
URL: https://www.openwall.com/lists/oss-se...
Whiteboard: A3 [ebuild+]
Keywords:
: 790713 (view as bug list)
Depends on:
Blocks: 802306
  Show dependency tree
 
Reported: 2020-11-04 10:47 UTC by Sam James
Modified: 2021-07-29 18:05 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sddm-0.19.0-pam-1.4-substack.patch (sddm-0.19.0-pam-1.4-substack.patch,973 bytes, patch)
2020-11-17 09:39 UTC, Lars Wendler (Polynomial-C)
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester gentoo-dev Security 2020-11-04 10:47:41 UTC
"a local privilege escalation has been discovered in the sddm display
manager [1].

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.

A simple reproducer works like this:

```
# run this from an unpriliged account before sddm is started to exploit
# the race condition and kill the X server
inotifywait /tmp/.X11-unix; while ! xkill; do :; done
```

The security issue was discovered by our SUSE sddm package maintainer
Fabian Vogt. The issue is included in sddm since version 0.12.0 and
was recently fixed in a new upstream release 0.19.0. The upstream commit
fixing this issue is found in [3]. The SUSE bugzilla bug tracking this
issue is found in [4]."
Comment 1 Sam James archtester gentoo-dev Security 2020-11-04 10:49:02 UTC
Patch: https://github.com/sddm/sddm/commit/be202f533ab98a684c6a007e8d5b4357846bc222.

Please apply or bump to 0.19.0.
Comment 2 Sam James archtester gentoo-dev Security 2020-11-15 09:29:56 UTC
Ping.
Comment 3 Lars Wendler (Polynomial-C) gentoo-dev 2020-11-17 09:36:13 UTC
We should perhaps wait with a bump to 0.19.0 until upstream fixed the following regression:
https://github.com/sddm/sddm/issues/1316
Comment 4 Lars Wendler (Polynomial-C) gentoo-dev 2020-11-17 09:39:12 UTC
Created attachment 671800 [details, diff]
sddm-0.19.0-pam-1.4-substack.patch

While toying with 0.19.0 I had to "fix" the pam-1.4 patch
Comment 5 Andreas Sturmlechner gentoo-dev 2020-11-17 09:40:44 UTC
Yup, we don't need yet another race condition in SDDM. A big update on the ebuild will be incoming soon, anyway, perhaps I should just make a PR with 0.19.0 while we wait for them to fix their stuff.
Comment 6 Andreas Sturmlechner gentoo-dev 2021-05-17 19:34:32 UTC
*** Bug 790713 has been marked as a duplicate of this bug. ***
Comment 7 Marco Scardovi (scardracs) 2021-07-12 14:20:55 UTC
Ping: any news?
Comment 8 NATTkA bot gentoo-dev 2021-07-29 17:25:29 UTC Comment hidden (obsolete)
Comment 9 NATTkA bot gentoo-dev 2021-07-29 17:34:02 UTC Comment hidden (obsolete)
Comment 10 NATTkA bot gentoo-dev 2021-07-29 17:41:55 UTC Comment hidden (obsolete)
Comment 11 NATTkA bot gentoo-dev 2021-07-29 18:05:58 UTC
Package list is empty or all packages have requested keywords.