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 644799

Summary: SELinux denies staff_u and user_u user to run ssh ProxyCommands
Product: Red Hat Enterprise Linux 6 Reporter: Niranjan Mallapadi Raghavender <mniranja>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Karel Srot <ksrot>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3CC: ksrot, mgrepl, mmalik
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.7.19-58.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 11:56:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Niranjan Mallapadi Raghavender 2010-10-20 10:13:33 UTC
Description of problem:

On RHEL6 beta2, with selinux-policy-3.7.19-29.el6.noarch and openssh-clients-5.3p1-18.el6.x86_64, when a user is created and specified
as staff_u or user_u , ssh ProxyCommand cannot be run. 

Version-Release number of selected component (if applicable):

selinux-policy-3.7.19-29.el6.noarch
openssh-clients-5.3p1-18.el6.x86_64


Steps to Reproduce:
1. Create a user 
$useradd testuser 

2. Specify as staff_u or user_u to the newly created user 
semanage login -a -s staff_u -r s0-s0:c0.c1023 testuser

3. Login as testuser 

4. Attempt to run ssh with ProxyCommands 
ssh -o 'ProxyCommand ssh -q gw.example.org nc %h 22' workstation.example.org
  
Actual results:

/bin/bash: /usr/bin/ssh: Permission denied
/bin/bash: /usr/bin/ssh: Success
ssh_exchange_identification: Connection closed by remote host

type=AVC msg=audit(1286897469.238:4236): avc: denied { execute_no_trans } for pid=12727 comm="bash" path="/usr/bin/ssh" dev=dm-1 ino=550124 scontext=staff_u:staff_r:ssh_t:s0 tcontext=system_u:object_r:ssh_exec_t:s0 tclass=file

type=SYSCALL msg=audit(1286897469.238:4236): arch=c000003e syscall=59 success=no exit=-13 a0=9b3460 a1=9b3130 a2=9b14a0 a3=8 items=0 ppid=12726 pid=12727 auid=501 uid=501 gid=501 euid=501 suid=501 fsuid=501 egid=501 sgid=501 fsgid=501 tty=tty2 ses=671 comm="bash" exe="/bin/bash" subj=staff_u:staff_r:ssh_t:s0 

Expected results:

ssh ProxyCommand should be run.

Comment 3 Miroslav Grepl 2010-10-26 10:43:43 UTC
Fixed in selinux-policy-3.7.19-58.el6.

Comment 7 Karel Srot 2011-03-08 13:15:07 UTC
I cannot reproduce this bug, even with the same openssh and selinux-policy version. 

Niranjan, 
do you know if the bug is reproducible on RHEL6.0? Is the reproducer complete?

Comment 10 errata-xmlrpc 2011-05-19 11:56:48 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0526.html