Bug 1083067 (CVE-2018-13054) - AUDIT-0: CVE-2018-13054: cinnamon: polkit-untracked-privilege: org.cinnamon.settings-users > possible symlink attack in cinnamon-settings-users.py
Summary: AUDIT-0: CVE-2018-13054: cinnamon: polkit-untracked-privilege: org.cinnamon.s...
Status: RESOLVED FIXED
Alias: CVE-2018-13054
Product: SUSE Security Incidents
Classification: Novell Products
Component: Audits (show other bugs)
Version: unspecified
Hardware: Other Other
: P5 - None : Normal
Target Milestone: unspecified
Assignee: Alexei Sorokin
QA Contact: Security Team bot
URL:
Whiteboard: CVSSv3:RedHat:CVE-2018-13054:5.3:(AV:...
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-27 12:36 UTC by Dominique Leuenberger
Modified: 2023-04-06 15:55 UTC (History)
4 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 Dominique Leuenberger 2018-02-27 12:36:56 UTC
Since you want to change this Info to an error, the current set of untracked privileges needs to be added to the white list.

cinnamon will newly fail with this check enforced:

[  386s] cinnamon.x86_64: I: polkit-untracked-privilege org.cinnamon.settings-users (auth_admin:auth_admin:auth_admin)
Comment 1 Matthias Gerstner 2018-03-09 14:56:56 UTC
The cinnamon settings daemon was already audited in bug 951830. So this is
only an incremental extension.
Comment 2 Swamp Workflow Management 2018-03-12 13:40:23 UTC
This is an autogenerated message for OBS integration:
This bug (1083067) was mentioned in
https://build.opensuse.org/request/show/585867 Factory / polkit-default-privs
Comment 3 Matthias Gerstner 2018-06-26 15:39:01 UTC
I will work on this now. This is actually for package
cinnamon-settings-daemon.
Comment 4 Matthias Gerstner 2018-06-27 13:37:37 UTC
This is in the cinnamon package after all. Obviously I confused something
here.

It's an pkexec action that allows to run a GUI implemented in python as root.
Since it's all auth_admin that fine so far. The GUI itself running as root is
a different matter. Will look deeper into it.
Comment 5 Matthias Gerstner 2018-06-28 13:55:56 UTC
Adding cinnamon maintainer to CC.
Making this private/embargoed.

So we have something here. Actually unrelated to the polkit rule itself, but
the GUI running as root opens up a symlink attack. The admin can change other
user's icons via the GUI. Once that happens, the GUI writes the new icon file
to the user's home directory into /home/<user>/.face.

If an unprivileged user puts a symlink there like:

rm $HOME/.face
ln -s /etc/shadow $HOME/.face

then as soon as the admin changes the icon, /etc/shadow will be overwritten by
an icon file. So this allows unprivileged users to prepare a DoS attack or
have further impact like creation a file /etc/suid-debug which allows to
weaked protection of setuid binaries.

It still requires admin interaction. Anyways still a serious bug.

I didn't report this to upstream yet, because they seemingly have no
responsible disclosure policy. I've contacted one of the devs I just recently
had to do with. Therefore this is currently still under embargoe. Please don't
spread it.
Comment 7 Matthias Gerstner 2018-06-28 13:57:24 UTC
In attachment 775569 [details] I have put a suggested patch that drops privileges to the
target user before touching that .face file. Let's see what upstream thinks
about it.
Comment 8 Matthias Gerstner 2018-07-02 11:35:55 UTC
Assigning this to the Cinnamon maintainer.

The upstream dev replied by now and they don't want an embargo. It is public
now via an upstream PR I just made:

https://github.com/linuxmint/Cinnamon/pull/7683

Let's see if they accept the patch. It should work though, I tested it on
Tumbleweed.

Please submit a fix to Factory and maintenance updates for Leap 15.0, Leap
42.3. Thank you!
Comment 9 Matthias Gerstner 2018-07-03 08:28:43 UTC
Upstream has merged the PR, so now it's time for us to integrate the patch,
too.
Comment 10 Swamp Workflow Management 2018-07-06 16:00:08 UTC
This is an autogenerated message for OBS integration:
This bug (1083067) was mentioned in
https://build.opensuse.org/request/show/621350 15.0 / cinnamon
Comment 11 Andreas Stieger 2018-07-11 18:25:10 UTC
Alexei, if 42.3 is affected do you plan to apply the same fix there?
Comment 12 Alexei Sorokin 2018-07-12 08:27:20 UTC
Andreas Stieger, it is affected, yeah. A request is out.
Comment 13 Swamp Workflow Management 2018-07-12 09:00:07 UTC
This is an autogenerated message for OBS integration:
This bug (1083067) was mentioned in
https://build.opensuse.org/request/show/622258 42.3 / cinnamon
https://build.opensuse.org/request/show/622260 15.0 / cinnamon
Comment 14 Swamp Workflow Management 2018-07-28 14:00:30 UTC
openSUSE-SU-2018:2121-1: An update that fixes one vulnerability is now available.

Category: security (moderate)
Bug References: 1083067
CVE References: CVE-2018-13054
Sources used:
openSUSE Leap 15.0 (src):    cinnamon-3.6.7-lp150.3.3.1
Comment 15 Swamp Workflow Management 2018-07-28 14:02:33 UTC
openSUSE-SU-2018:2125-1: An update that fixes one vulnerability is now available.

Category: security (moderate)
Bug References: 1083067
CVE References: CVE-2018-13054
Sources used:
openSUSE Leap 42.3 (src):    cinnamon-3.4.6-2.3.1
Comment 16 Matthias Gerstner 2018-08-03 14:51:35 UTC
Updates are all out. Closing this bug as FIXED.