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 - SELinux denies staff_u and user_u user to run ssh ProxyCommands
Summary: SELinux denies staff_u and user_u user to run ssh ProxyCommands
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Karel Srot
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-20 10:13 UTC by Niranjan Mallapadi Raghavender
Modified: 2018-11-14 16:51 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-3.7.19-58.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-19 11:56:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0526 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2011-05-19 09:37:41 UTC

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


Note You need to log in before you can comment on or make changes to this bug.