Bug 689098

Summary: SELinux is preventing /usr/sbin/sshd from 'sendto' accesses on the unix_dgram_socket /dev/log.
Product: [Fedora] Fedora Reporter: Jeff Layton <jlayton>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 15CC: dwalsh, hgkamath, mgrepl, steved
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:a44bf16f2d2ab6bccd334c13bbb69a50895308bc3818d0e94afd4d3f6309fa03
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-21 21:56:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
/dev/log avc denials none

Description Jeff Layton 2011-03-19 13:37:52 UTC
SELinux is preventing /usr/sbin/sshd from 'sendto' accesses on the unix_dgram_socket /dev/log.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that sshd should be allowed sendto access on the log unix_dgram_socket by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep sshd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:sshd_t:s0-s0:c0.c1023
Target Context                system_u:system_r:initrc_t:s0
Target Objects                /dev/log [ unix_dgram_socket ]
Source                        sshd
Source Path                   /usr/sbin/sshd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           openssh-server-5.6p1-30.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-5.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38-1.fc15.x86_64
                              #1 SMP Tue Mar 15 05:29:00 UTC 2011 x86_64 x86_64
Alert Count                   2
First Seen                    Sat 19 Mar 2011 09:23:22 AM EDT
Last Seen                     Sat 19 Mar 2011 09:28:41 AM EDT
Local ID                      e7ef6126-3e24-482f-b618-16c37d0aae2a

Raw Audit Messages
type=AVC msg=audit(1300541321.519:35): avc:  denied  { sendto } for  pid=1094 comm="sshd" path="/dev/log" scontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 tcontext=system_u:system_r:initrc_t:s0 tclass=unix_dgram_socket


type=SYSCALL msg=audit(1300541321.519:35): arch=x86_64 syscall=connect success=yes exit=0 a0=4 a1=7f80becf77c0 a2=6e a3=0 items=0 ppid=1 pid=1094 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: sshd,sshd_t,initrc_t,unix_dgram_socket,sendto

audit2allow

#============= sshd_t ==============
allow sshd_t initrc_t:unix_dgram_socket sendto;

audit2allow -R

#============= sshd_t ==============
allow sshd_t initrc_t:unix_dgram_socket sendto;

Comment 1 Jeff Layton 2011-03-19 13:41:56 UTC
Created attachment 486374 [details]
/dev/log avc denials

Since patching my machine this morning, I'm also seeing denials for /dev/log to a broad range of programs. This is:

    # grep /dev/log /var/log/audit/audit.log

...I had to set selinux in permissive mode in order to boot and I'm pretty sure it's due to this.

Comment 2 Daniel Walsh 2011-03-21 21:56:29 UTC

*** This bug has been marked as a duplicate of bug 689435 ***