Bug 131083 - sshd does not permit SE Linux logins
Summary: sshd does not permit SE Linux logins
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: openssh
Version: rawhide
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks: FC3Blocker
TreeView+ depends on / blocked
 
Reported: 2004-08-27 12:17 UTC by Russell Coker
Modified: 2007-11-30 22:10 UTC (History)
2 users (show)

Fixed In Version: 3.9p1-2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-09-03 21:00:48 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Russell Coker 2004-08-27 12:17:07 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.3; Linux) (KHTML, like Gecko)

Description of problem:
After upgrading my server to openssh-server-3.9p1-1 I could not login any more.

The sshd was not relabelling the terminal device node to the new SE Linux context, so the context remained as sshd_devpts_t instead of being correctly set to user_devpts_t or staff_devpts_t.  The previous version worked well.

I can give you administrative access to a SE Linux test machine running the latest rawhide to duplicate this if necessary.

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


How reproducible:
Always

Steps to Reproduce:
Upgrade a SE Linux machine to the latest rawhide and observe that you can't login.

Actual Results:  The below message appears in /var/log/messages and the session is terminated.

avc:  denied  { read write } for  pid=18055 exe=/bin/bash 
path=/dev/pts/1 dev=devpts ino=3 scontext=root:staff_r:staff_t tcontext=root:object_r:sshd_devpts_t tclass=chr_file


Additional info:

Comment 1 Russell Coker 2004-08-27 12:19:29 UTC
The above occurs when using the "strict" policy.  Using "targeted" 
it is likely to work without problems although I have not yet tested 
this.  In any case using "targeted" will give different symptoms if 
it fails. 

Comment 2 Stephen Smalley 2004-08-27 12:44:04 UTC
Looks like the openssh-selinux.patch wasn't properly updated for
openssh-3.9p1, and unfortunately it happened to compile nonetheless.
In sshpty.c, the -selinux patch is referencing "ttyname" whereas the
function parameter is now named "tty".  It happens to compile (albeit
with warnings) because ttyname is defined in global scope for
ttyname(3), so I guess we are passing a _function pointer_ here rather
than the tty name.  s/ttyname/tty/g please in the openssh-selinux.patch.


Comment 3 Nalin Dahyabhai 2004-09-03 21:00:48 UTC
This should be fixed in 3.9p1-2 and later.  Please reopen if you find
that this is not the case.  Thanks!


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