Bug 1296309

Summary: SELinux is preventing systemd from 'listen' accesses on the unix_stream_socket /run/libvirt/virtlogd-sock.
Product: [Fedora] Fedora Reporter: Joachim Frieben <jfrieben>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: high    
Version: rawhideCC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:1069fbd076e44314c477714034cf874ec538ff44fbb9e80771ea3ae5c109a3fa;VARIANT_ID=workstation;
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-20 09:15:15 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:

Description Joachim Frieben 2016-01-06 21:01:57 UTC
Description of problem:
SELinux is preventing systemd from 'listen' accesses on the unix_stream_socket /run/libvirt/virtlogd-sock.

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

If you believe that systemd should be allowed listen access on the virtlogd-sock unix_stream_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 systemd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:init_t:s0
Target Context                system_u:system_r:unconfined_service_t:s0
Target Objects                /run/libvirt/virtlogd-sock [ unix_stream_socket ]
Source                        systemd
Source Path                   systemd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-164.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.4.0-0.rc8.git0.1.fc24.x86_64 #1
                              SMP Mon Jan 4 17:13:26 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-01-06 21:57:44 CET
Last Seen                     2016-01-06 21:57:44 CET
Local ID                      0c97ca24-f0e4-4a4e-93d7-a9cc5179816a

Raw Audit Messages
type=AVC msg=audit(1452113864.400:82): avc:  denied  { listen } for  pid=1 comm="systemd" path="/run/libvirt/virtlogd-sock" scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:unconfined_service_t:s0 tclass=unix_stream_socket permissive=1


Hash: systemd,init_t,unconfined_service_t,unix_stream_socket,listen

Version-Release number of selected component:
selinux-policy-3.13.1-164.fc24.noarch

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.4.0-0.rc8.git0.1.fc24.x86_64
type:           libreport

Comment 1 Daniel Walsh 2016-01-07 14:06:47 UTC
Ls virtlogd-sock created by a new daemon?

This should be allowed since systemd can listen on sockets on behalf of other domains, and unknown domains should be allowed.

Comment 2 Daniel Walsh 2016-01-07 14:07:21 UTC
*** Bug 1296311 has been marked as a duplicate of this bug. ***

Comment 3 Joachim Frieben 2016-01-19 20:45:27 UTC
The action suggested in https://bugzilla.redhat.com/show_bug.cgi?id=1291940#c10 enables service virtlogd.socket to start up correctly, thanks!

Comment 4 Lukas Vrabec 2016-01-20 09:15:15 UTC

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