Bug 897788 (CVE-2014-7272) - VUL-1: CVE-2014-7272: sddm: various local privilege issues
Summary: VUL-1: CVE-2014-7272: sddm: various local privilege issues
Status: RESOLVED FIXED
Alias: CVE-2014-7272
Product: SUSE Security Incidents
Classification: Novell Products
Component: Audits (show other bugs)
Version: unspecified
Hardware: Other Other
: P4 - Low : Normal
Target Milestone: ---
Assignee: Sebastian Krahmer
QA Contact: Security Team bot
URL: https://build.opensuse.org/request/sh...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-22 15:23 UTC by Marcus Meissner
Modified: 2016-03-17 18:14 UTC (History)
6 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Meissner 2014-09-22 15:23:36 UTC
A new window manager called "sddm" uses /etc/dbus-1/system.d/org.freedesktop.DisplayManager.conf

which we previously whitelisted for lightdm.

We need to look at the DBUS service usage of sddm.
Comment 5 Sebastian Krahmer 2014-10-01 10:02:28 UTC
There are various problems with this display manager,
I will make one comment for each security issue.
Comment 6 Sebastian Krahmer 2014-10-01 10:06:22 UTC
The user "sddm" can login without authentication.

This is since if sddm detects that user in the PamBackend,
it has:

        if (user == "sddm")
            service = "sddm-greeter";
        else if (m_app->session()->path().isEmpty())
            service = "sddm-check";
        else if (m_autologin)
            service = "sddm-autologin";
        result = m_pam->start(service, user);


and the sddm-greeter PAM config basically just has a pam_permit.

Dont know how the initial user-list during greeter session is
created, but it seems to skip UIDs < 1000, so the sddm user
is not available for choosing in the first place. Nevertheless,
this is at least fail-open and might be worse in future if XDMCP
is implemented or user names can be passed by other means (which might already
work somehow).
Comment 7 Sebastian Krahmer 2014-10-01 10:08:30 UTC
The xauth cookie handling code calls xauth binary via
popen() as root, which in turn dumps and creates files as root
in users ~.

This is a local root exploit.
Comment 8 Sebastian Krahmer 2014-10-01 10:10:01 UTC
After xauth has done its job, sddm chowns() the ~/.Xauthority
file to user. This is a race and a local root exploit.

By fixing issue from former comment, invoking xauth as
user we can save this chown() and fix both issues alltogether.
Comment 9 Sebastian Krahmer 2014-10-01 10:15:58 UTC
The .xsession-errors file is created in ~ but as root.

This allows to destroy arbitrary system files.
Comment 10 Sebastian Krahmer 2014-10-06 08:01:25 UTC
Patch for the sddm user:

https://github.com/sddm/sddm/pull/279 (CVE-2014-7271)
Comment 11 Sebastian Krahmer 2014-10-06 08:03:53 UTC
File race issues:

https://github.com/sddm/sddm/pull/280 (CVE-2014-7272)
Comment 12 Sebastian Krahmer 2014-10-06 08:04:16 UTC
Please submit patches for Factory.
Comment 13 Stephan Kulow 2014-10-06 09:40:38 UTC
I'll remove sddm from factory and 13.2 for the time being - it went into factory by mistake anyway (the file conflict with lightdm should have been spoted but wasn't)
Comment 14 Swamp Workflow Management 2014-10-06 22:00:13 UTC
bugbot adjusting priority
Comment 15 Forgotten User DV81ZEWZkN 2014-10-09 01:17:29 UTC
@Sebastian,
please take a look at the current package at KDE:Frameworks5/sddm. i've updated to master, where both mentioned requests have been merged.
Comment 16 Forgotten User DV81ZEWZkN 2014-10-17 17:11:31 UTC
ping
according to upstream, all issues should be resolved. i've updated to 0.10.0 release in KDE:Frameworks5, and i would really like with sec-team's and Stephan's permission to have it back in 13.2!

thanks!
Comment 17 Sebastian Krahmer 2014-11-26 10:46:58 UTC
From what I see in the git, both patches make sense, so
you can go ahead adding it back to Factory.

We'd need to review it again anyways in quite some time, since
I expect a lot of code to be added/changed.
Comment 18 Bernhard Wiedemann 2014-12-08 22:00:22 UTC
This is an autogenerated message for OBS integration:
This bug (897788) was mentioned in
https://build.opensuse.org/request/show/264472 Factory / sddm
Comment 19 Sebastian Krahmer 2014-12-10 13:11:06 UTC
done
Comment 20 Bernhard Wiedemann 2014-12-10 21:00:32 UTC
This is an autogenerated message for OBS integration:
This bug (897788) was mentioned in
https://build.opensuse.org/request/show/264718 Factory / sddm
Comment 21 Marcus Meissner 2014-12-11 08:41:14 UTC
sebastian, a rpmlint diff was also needed, but  Hrvoje submitted it already.

+    # sddm (boo#897788)
+    "sddm_org.freedesktop.DisplayManager.conf",

I went and accepted it.
Comment 23 Swamp Workflow Management 2016-03-17 18:14:33 UTC
SUSE-RU-2016:0808-1: An update that has 9 recommended fixes can now be installed.

Category: recommended (low)
Bug References: 897788,904060,907625,907662,915769,916766,918799,928492,941993
CVE References: 
Sources used:
SUSE Linux Enterprise Software Development Kit 12 (src):    rpmlint-1.5-26.3.2