Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CVE-2019-13272 #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add CVE-2019-13272 #3

wants to merge 2 commits into from

Conversation

pedrib
Copy link

@pedrib pedrib commented Aug 31, 2019

Not my exploit, this comes from Jann Horn from Google's Project Zero:
https://bugs.chromium.org/p/project-zero/issues/detail?id=1903

This works pretty well on all machines I have tested.
Works at least on Linux 4.10 < 5.1.17, but it was also backported to some earlier versions according to the link above.

@jollheef
Copy link
Owner

Hello, thank you for a pull request.

You need to create also file with metadata and update .travis.yml, see #2 for example.

static const char *helper_path;

const char *helpers[] = {
"/usr/lib/x86_64-linux-gnu/xfce4/session/xfsm-shutdown-helper",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is from xfce4-session, which is not presented in most of the installations.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True - actually it relies on available helper methods that are typically found in desktops.
Quote from the page above:

Polkit's pkexec helper fits this pattern. On a typical desktop system, any
process running under an active local session can invoke some helpers through
pkexec (see configuration in /usr/share/polkit-1/actions, search for <action>s
that specify <allow_active>yes</allow_active> and <annotate key="org.freedesktop.policykit.exec.path">...</annotate>).
While pkexec is normally used to run programs as root, pkexec actually allows
its caller to specify the user to run a command as with --user, which permits
using pkexec to run a command as the user who executed pkexec. (Which is kinda
weird... why would I want to run pkexec helpers as more than one fixed user?)

I have attached a proof-of-concept that works on Debian 10 running a distro
kernel and the XFCE desktop environment; if you use a different desktop
environment, you may have to add a path to the `helpers` array in the PoC. When
you compile and run it in an active local session, you should get a root shell
within a second.

@jollheef
Copy link
Owner

This exploit is not working over ssh and requires to be run from the local user only (jas502n/CVE-2019-13272#2), which means right now it's not possible to merge it till out-of-tree/out-of-tree#18 will be implemented.

@jollheef jollheef added blocked and removed blocked labels Aug 31, 2019
Repository owner deleted a comment from github-actions bot Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants