Bug 587255 - SELinux is preventing /usr/bin/ssh "read" access on .ssh.
Summary: SELinux is preventing /usr/bin/ssh "read" access on .ssh.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 13
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:4d50fcb5d69...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-04-29 13:38 UTC by Adam Kovari
Modified: 2010-04-29 19:44 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2010-04-29 18:32:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Adam Kovari 2010-04-29 13:38:44 UTC
Summary:

SELinux is preventing /usr/bin/ssh "read" access on .ssh.

Detailed Description:

[SELinux is in permissive mode. This access was not denied.]

SELinux denied access requested by ssh. It is not expected that this access is
required by ssh and this access may signal an intrusion attempt. It is also
possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                system_u:system_r:mount_t:s0
Target Context                system_u:object_r:ssh_home_t:s0
Target Objects                .ssh [ lnk_file ]
Source                        ssh
Source Path                   /usr/bin/ssh
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           openssh-clients-5.4p1-1.fc13
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-6.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.33.2-57.fc13.x86_64 #1 SMP Tue Apr 20 08:57:50
                              UTC 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Št 29. apríl 2010, 11:15:29 CEST
Last Seen                     Št 29. apríl 2010, 11:15:29 CEST
Local ID                      e6c89e69-5f41-41a5-b65b-ca08ac638828
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1272532529.245:6): avc:  denied  { read } for  pid=1438 comm="ssh" name=".ssh" dev=sda3 ino=43719 scontext=system_u:system_r:mount_t:s0 tcontext=system_u:object_r:ssh_home_t:s0 tclass=lnk_file

node=(removed) type=SYSCALL msg=audit(1272532529.245:6): arch=c000003e syscall=2 success=no exit=-2 a0=7fffad9fec60 a1=0 a2=1b6 a3=0 items=0 ppid=1 pid=1438 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="ssh" exe="/usr/bin/ssh" subj=system_u:system_r:mount_t:s0 key=(null)



Hash String generated from  catchall,ssh,mount_t,ssh_home_t,lnk_file,read
audit2allow suggests:

#============= mount_t ==============
allow mount_t ssh_home_t:lnk_file read;

Comment 1 Daniel Walsh 2010-04-29 14:48:32 UTC
Looks like you set up .ssh as a symbolic link somewhere which is causing this avc?

Comment 2 Adam Kovari 2010-04-29 14:51:38 UTC
Yes,
lrwxrwxrwx.  1 root root    16 apr 28 18:42 .ssh -> /home/adam/.ssh/

Is that a problem?

Comment 3 Daniel Walsh 2010-04-29 18:31:55 UTC
No but that is what it is complaining about.  You can add these rules using audit2allow 

# grep ssh_home_t /var/log/audit/audit.log | audit2allow -M myssh
# semodule -i myssh.pp

Comment 4 Daniel Walsh 2010-04-29 18:32:18 UTC
Closing as not a bug since this is local customization

Comment 5 Adam Kovari 2010-04-29 19:44:49 UTC
Thanks.


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