Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1376826

Summary: guest_t can run sudo
Product: Red Hat Enterprise Linux 6 Reporter: Stefan Kremen <skremen>
Component: opensshAssignee: Jakub Jelen <jjelen>
Status: CLOSED NOTABUG QA Contact: Stefan Dordevic <sdordevi>
Severity: high Docs Contact:
Priority: high    
Version: 6.8CC: jjelen, ksrot, lvrabec, mgrepl, mmalik, nmavrogi, plautrba, pvrabec, qe-baseos-security, skremen, szidek
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1357859
: 1378463 (view as bug list) Environment:
Last Closed: 2016-11-02 12:00:55 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: 1356245, 1357857, 1357859, 1357860    
Bug Blocks: 1378463    

Comment 7 Jakub Jelen 2016-09-29 08:34:33 UTC
The main concern in this bug is that confined user guest_t have setuid and setgid SELinux capabilities, which can be "misused" by sudo (or other tools?).

Generally, for running sudo, there are needed underlying Linux capabilities, access to other files and finally being in the sudoers file. The consequence of fixing this bug is mostly hardening SELinux policy, based on the original report. I also asked Miroslav to confirm this explanation and add if I missed something.

Comment 8 Lukas Vrabec 2016-09-29 14:10:29 UTC
Jakub is right. We should fix this in RHEL-6.

Comment 10 Jakub Jelen 2016-11-02 12:00:55 UTC
Based on our meeting with Lukas yesterday, we decided to fix this bug only in selinux-policy and therefore this is not bug in OpenSSH.

The openssh in RHEL6 is using special selinux user chroot_user_t which has the permissions to chroot, setuid and setgit permissions.
On the other hand the guest_t users do not need the setuid and setgit permissions, therefore they will be removed based on the selinux-policy bug.