Bug 608130 - SELinux is preventing the sshd from using potentially mislabeled files (authorized_keys).
SELinux is preventing the sshd from using potentially mislabeled files (autho...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
12
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
setroubleshoot_trace_hash:5d919380160...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-25 15:05 EDT by Steve Dickson
Modified: 2010-06-25 15:45 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-25 15:45:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Steve Dickson 2010-06-25 15:05:22 EDT
Summary:

SELinux is preventing the sshd from using potentially mislabeled files
(authorized_keys).

Detailed Description:

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

SELinux has denied sshd access to potentially mislabeled file(s)
(authorized_keys). This means that SELinux will not allow sshd to use these
files. It is common for users to edit files in their home directory or tmp
directories and then move (mv) them to system directories. The problem is that
the files end up with the wrong file context which confined applications are not
allowed to access.

Allowing Access:

If you want sshd to access this files, you need to relabel them using restorecon
-v 'authorized_keys'. You might want to relabel the entire directory using
restorecon -R -v ''.

Additional Information:

Source Context                system_u:system_r:sshd_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:admin_home_t:s0
Target Objects                authorized_keys [ file ]
Source                        sshd
Source Path                   /usr/sbin/sshd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           openssh-server-5.2p1-2.fc11
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.12-86.fc11
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   home_tmp_bad_labels
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.30.8-64.fc11.i686.PAE #1 SMP Fri Sep 25
                              04:56:58 EDT 2009 i686 i686
Alert Count                   4
First Seen                    Fri 06 Nov 2009 11:08:08 AM EST
Last Seen                     Fri 06 Nov 2009 11:08:22 AM EST
Local ID                      42505e7a-dbc9-444e-9fc8-b49d20100abd
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1257523702.991:15383): avc:  denied  { read } for  pid=9641 comm="sshd" name="authorized_keys" dev=dm-1 ino=3421 scontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:admin_home_t:s0 tclass=file

node=(removed) type=AVC msg=audit(1257523702.991:15383): avc:  denied  { open } for  pid=9641 comm="sshd" name="authorized_keys" dev=dm-1 ino=3421 scontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:admin_home_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1257523702.991:15383): arch=40000003 syscall=5 success=yes exit=4 a0=13559c0 a1=8800 a2=0 a3=1346af0 items=0 ppid=1698 pid=9641 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="sshd" exe="/usr/sbin/sshd" subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  home_tmp_bad_labels,sshd,sshd_t,admin_home_t,file,read
audit2allow suggests:

#============= sshd_t ==============
allow sshd_t admin_home_t:file { read open };
Comment 1 Daniel Walsh 2010-06-25 15:45:25 EDT
restorecon -R -v /root

Will fix.

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