Bug 429560 - selinux reveals ssh is leaking a file descriptor
Summary: selinux reveals ssh is leaking a file descriptor
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: openssh
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-01-21 17:21 UTC by Daniel Walsh
Modified: 2008-04-07 20:07 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-04-07 20:07:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
I think this patch might fix the problem. (406 bytes, patch)
2008-01-21 17:22 UTC, Daniel Walsh
no flags Details | Diff
This socket needs cloexec instead. (534 bytes, patch)
2008-01-21 19:14 UTC, Tomas Mraz
no flags Details | Diff

Description Daniel Walsh 2008-01-21 17:21:36 UTC
Description of problem:

When running ssh from a staff user, there is a transition to xauth, so xauth
runs in a different context and SELinux gerates this AVC.

time->Mon Jan 21 11:47:57 2008
type=SYSCALL msg=audit(1200934077.724:113): arch=c000003e syscall=59 success=yes
exit=0 a0=8cbb80 a1=8ca410 a2=8ca070 a3=3c68b599f0 items=0 ppid=5362 pid=5363
auid=3267 uid=3267 gid=3267 euid=3267 suid=3267 fsuid=3267 egid=3267 sgid=3267
fsgid=3267 tty=pts5 comm="xauth" exe="/usr/bin/xauth"
subj=staff_u:staff_r:xauth_t:s0 key=(null)
type=AVC msg=audit(1200934077.724:113): avc:  denied  { read write } for 
pid=5363 comm="xauth" path="socket:[77954]" dev=sockfs ino=77954
scontext=staff_u:staff_r:xauth_t:s0 tcontext=staff_u:staff_r:staff_t:s0
tclass=tcp_socket

THis indicates a leaked file descritor.

Comment 1 Daniel Walsh 2008-01-21 17:22:59 UTC
Created attachment 292388 [details]
I think this patch might fix the problem.

Comment 2 Tomas Mraz 2008-01-21 19:14:30 UTC
Created attachment 292397 [details]
This socket needs cloexec instead.


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