Bug 1299955
Summary: | pkexec tty hijacking via TIOCSTI ioctl | ||
---|---|---|---|
Product: | [Other] Security Response | Reporter: | Federico Manuel Bento <up201407890> |
Component: | vulnerability | Assignee: | Red Hat Product Security <security-response-team> |
Status: | CLOSED ERRATA | QA Contact: | |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | unspecified | CC: | carnil, davidlewis4, sam |
Target Milestone: | --- | Keywords: | Security |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-10-19 09:04:31 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1300746 |
Description
Federico Manuel Bento
2016-01-19 15:37:52 UTC
You have to possess CAP_SYS_ADMIN to successfully invoke the TIOCSTI ioctl. That implies to me that pkexec is allowing test to execute with that (and possibly other) capabilities. If that's the case, you're merely running as root by another name. Or you can pass that tty ownership check that's been in there seemingly forever... sorry for the noise. Has this actually been fixed? On a RHEL 8.9 system I've built the sample exploit from https://ruderich.org/simon/notes/su-sudo-from-root-tty-hijacking and it works: root@myhost:/var/tmp/tiocsti130# pkexec -u nobody /bin/bash bash-4.4$ /var/tmp/tiocsti/tiocsti # <-- this is me running the exploit, subsequent output is caused by the exploit hijacking my terminal exit echo Payload as `whoami` bash-4.4$ exit exit root@myhost:/var/tmp/tiocsti# echo Payload as `whoami` Payload as root |