Bug 865759
Summary: | Root can ssh when ssh_sysadm_login --> off in MLS | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Michal Trunecka <mtruneck> |
Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> |
Status: | CLOSED ERRATA | QA Contact: | Milos Malik <mmalik> |
Severity: | urgent | Docs Contact: | |
Priority: | urgent | ||
Version: | 6.4 | CC: | degts, dwalsh, ebenes, mmalik, mvadkert, pvrabec, tlavigne |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | selinux-policy-3.7.19-193.el6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-02-21 08:31:22 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: | 895654 |
Description
Michal Trunecka
2012-10-12 11:06:35 UTC
What does # id -Z As root after ssh: # id -Z root:sysadm_r:sysadm_t:s0-s15:c0.c1023 Miro, does we break MLS? Is there a test which contain this boolean? This request was not resolved in time for the current release. Red Hat invites you to ask your support representative to propose this request, if still desired, for consideration in the next release of Red Hat Enterprise Linux. It looks like we will need to remove this boolean because of privsep patch. To add, not adding a role, sensitivity, and category fails as desired... # ssh root@localhost root@localhost's password: Unable to get valid context for root Last login: Tue Jan 8 14:09:14 2013 from localhost Connection to localhost closed. But adding a role like sysadm_r causes it to succeed which isn't the desired behavior... # ssh root/sysadm_r@localhost root/sysadm_r@localhost's password: Last login: Tue Jan 8 14:09:36 2013 from localhost [root@rhel6 ~]# And adding a role and a sensitivity and/or category also causes a succeess which again isn't desired... # ssh root/sysadm_r/U-TS@localhost root/sysadm_r/U-TS@localhost's password: Last login: Tue Jan 8 14:10:37 2013 from localhost [root@rhel6 ~]# For the sake of completeness, here are the cases w/ssh_sysadm_login disabled (default) and enabled on a RHEL 6 system fully patched with the MLS policy. Essentially, the results are the same whether ssh_sysadm_login is disabled or enabled. In other words, the boolean appears to have no effect. The root login behavior is the same no matter what the boolean setting is. # ssh_sysadm_login disabled (default) -- sysadm_r may not ssh in ================================================================ # boolean off (default) [root@rhel6 ~]# getsebool ssh_sysadm_login ssh_sysadm_login --> off # root by itself cannot get in (desired result) [root@rhel6 ~]# ssh root@localhost root@localhost's password: Unable to get valid context for root Last login: Wed Jan 9 08:57:21 2013 from localhost Connection to localhost closed. # root/sysadm_r can get in (not desired result) [root@rhel6 ~]# ssh root/sysadm_r@localhost root/sysadm_r@localhost's password: Last login: Wed Jan 9 08:59:22 2013 from localhost [root@rhel6 ~]# logout Connection to localhost closed. # root/sysadm_r/U-TS can get in (not desired result) [root@rhel6 ~]# ssh root/sysadm_r/U-TS@localhost root/sysadm_r/U-TS@localhost's password: Last login: Wed Jan 9 08:59:43 2013 from localhost [root@rhel6 ~]# logout Connection to localhost closed. # ssh_sysadm_login enabled -- sysadm_r may ssh in ================================================= # boolean on [root@rhel6 ~]# setsebool -P ssh_sysadm_login on [root@rhel6 ~]# getsebool ssh_sysadm_login ssh_sysadm_login --> on # root by itself cannot get in (not desired result) [root@rhel6 ~]# ssh root@localhost root@localhost's password: Unable to get valid context for root Last login: Wed Jan 9 09:00:09 2013 from localhost Connection to localhost closed. # root/sysadm_r can get in (desired result) [root@rhel6 ~]# ssh root/sysadm_r@localhost root/sysadm_r@localhost's password: Last login: Wed Jan 9 09:01:48 2013 from localhost [root@rhel6 ~]# logout Connection to localhost closed. # root/sysadm_r/U-TS can get in (desired result) [root@rhel6 ~]# ssh root/sysadm_r/U-TS@localhost root/sysadm_r/U-TS@localhost's password: Last login: Wed Jan 9 09:02:09 2013 from localhost [root@rhel6 ~]# logout Connection to localhost closed. > In other words, the boolean appears to have no effect.
Yes, this is caused by privsep patch in openssh. We have been discussing it with Dan and we believe we have a solution. But it needs to be tested. I will do a scratch build.
Ok, it looks fine with our solution. We need to get a fix ASAP for testing. Fixed in selinux-policy-3.7.19-193.el6 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-0314.html |