Bug 1537428

Summary: SELinux is preventing NetworkManager from 'read' accesses on the directory /var/lib/libvirt/dnsmasq.
Product: [Fedora] Fedora Reporter: Diftraku <diftraku>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: dwalsh, lvrabec, mgrepl, plautrba, pmoore
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:f338ba7c46cfa5fcfb7cfe1a7c36c8deb63c4b1be963508fa60adeb3845a52fc;VARIANT_ID=workstation;
Fixed In Version: selinux-policy-3.13.1-283.24.fc27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-06 15:30:45 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 Diftraku 2018-01-23 08:09:29 UTC
Description of problem:
Having libvirt-nss installed and enabled in nsswitch.conf seems to continuously cause AVC denials when NetworkManager wants to access libvirt's own dnsmasq.

This is very likely a dupe of bug #1507110
SELinux is preventing NetworkManager from 'read' accesses on the directory /var/lib/libvirt/dnsmasq.

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

If you believe that NetworkManager should be allowed read access on the dnsmasq directory 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:
# ausearch -c 'NetworkManager' --raw | audit2allow -M my-NetworkManager
# semodule -X 300 -i my-NetworkManager.pp

Additional Information:
Source Context                system_u:system_r:NetworkManager_t:s0
Target Context                system_u:object_r:virt_var_lib_t:s0
Target Objects                /var/lib/libvirt/dnsmasq [ dir ]
Source                        NetworkManager
Source Path                   NetworkManager
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           libvirt-daemon-driver-network-3.7.0-3.fc27.x86_64
Policy RPM                    selinux-policy-3.13.1-283.19.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.14.11-300.fc27.x86_64 #1 SMP Wed
                              Jan 3 13:52:28 UTC 2018 x86_64 x86_64
Alert Count                   18
First Seen                    2017-12-20 10:36:07 EET
Last Seen                     2018-01-05 10:38:23 EET
Local ID                      57f7f37f-68b5-4c54-a53b-c26a382c4bba

Raw Audit Messages
type=AVC msg=audit(1515141503.843:370): avc:  denied  { read } for  pid=1889 comm="NetworkManager" name="dnsmasq" dev="dm-1" ino=1710671 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:virt_var_lib_t:s0 tclass=dir permissive=0


Hash: NetworkManager,NetworkManager_t,virt_var_lib_t,dir,read

Version-Release number of selected component:
selinux-policy-3.13.1-283.19.fc27.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.3
hashmarkername: setroubleshoot
kernel:         4.14.13-300.fc27.x86_64
type:           libreport

Potential duplicate: bug 1507110

Comment 1 Fedora Update System 2018-01-30 16:40:01 UTC
selinux-policy-3.13.1-283.24.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-a144eca5a8

Comment 2 Fedora Update System 2018-01-31 22:44:18 UTC
selinux-policy-3.13.1-283.24.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-a144eca5a8

Comment 3 Fedora Update System 2018-02-06 15:30:45 UTC
selinux-policy-3.13.1-283.24.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.