Bug 875193

Summary: SELinux is preventing /usr/sbin/dnsmasq from 'search' accesses on the directory /etc/NetworkManager.
Product: [Fedora] Fedora Reporter: Andrea Dell'Amico <adellam>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: dominick.grift, dwalsh, loganjerry, mgrepl, mishu, pedrogfrancisco
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:b1e5fc5401541854013fac17e63b249df1293b32fbd0362886fd691969ce779b
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-20 15:36:51 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
File: type
none
File: hashmarkername none

Description Andrea Dell'Amico 2012-11-09 18:54:40 UTC
Description of problem:
It happens when I restart the network from the NetworkManager gui.

I have

dns=dnsmasq

in /etc/NetworkManager/NetworkManager.conf


Additional info:
libreport version: 2.0.18
kernel:         3.6.5-1.fc17.x86_64

description:
:SELinux is preventing /usr/sbin/dnsmasq from 'search' accesses on the directory /etc/NetworkManager.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that dnsmasq should be allowed search access on the NetworkManager 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:
:# grep dnsmasq /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:dnsmasq_t:s0
:Target Context                system_u:object_r:NetworkManager_etc_t:s0
:Target Objects                /etc/NetworkManager [ dir ]
:Source                        dnsmasq
:Source Path                   /usr/sbin/dnsmasq
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           dnsmasq-2.63-1.fc17.x86_64
:Target RPM Packages           initscripts-9.37.1-1.fc17.x86_64
:                              dhclient-4.2.4-16.P2.fc17.x86_64
:                              NetworkManager-0.9.6.4-1.fc17.x86_64
:Policy RPM                    selinux-policy-3.10.0-156.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.6.5-1.fc17.x86_64 #1 SMP Wed Oct
:                              31 19:37:18 UTC 2012 x86_64 x86_64
:Alert Count                   11
:First Seen                    2012-11-08 10:30:55 CET
:Last Seen                     2012-11-09 19:51:07 CET
:Local ID                      2d8fd204-344c-4307-ad20-3a8c2815df23
:
:Raw Audit Messages
:type=AVC msg=audit(1352487067.130:125): avc:  denied  { search } for  pid=19743 comm="dnsmasq" name="NetworkManager" dev="dm-2" ino=155049 scontext=system_u:system_r:dnsmasq_t:s0 tcontext=system_u:object_r:NetworkManager_etc_t:s0 tclass=dir
:
:
:type=SYSCALL msg=audit(1352487067.130:125): arch=x86_64 syscall=openat success=no exit=EACCES a0=ffffffffffffff9c a1=1f59bf0 a2=90800 a3=0 items=0 ppid=622 pid=19743 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=dnsmasq exe=/usr/sbin/dnsmasq subj=system_u:system_r:dnsmasq_t:s0 key=(null)
:
:Hash: dnsmasq,dnsmasq_t,NetworkManager_etc_t,dir,search
:
:audit2allow
:
:#============= dnsmasq_t ==============
:allow dnsmasq_t NetworkManager_etc_t:dir search;
:
:audit2allow -R
:
:#============= dnsmasq_t ==============
:allow dnsmasq_t NetworkManager_etc_t:dir search;
:


Potential duplicate bug: 866422

Comment 1 Andrea Dell'Amico 2012-11-09 18:54:43 UTC
Created attachment 641780 [details]
File: type

Comment 2 Andrea Dell'Amico 2012-11-09 18:54:45 UTC
Created attachment 641781 [details]
File: hashmarkername

Comment 3 Miroslav Grepl 2012-11-12 09:54:55 UTC
Fixed in selinux-policy-3.10.0-160.fc17

commit 67246907ab9c50956069383eb93dc64987faa3d9
Author: Miroslav Grepl <mgrepl>
Date:   Mon Nov 12 10:53:13 2012 +0100

    Allow dnsmasq to read /etc/NetworkManager

Comment 4 Mihai Harpau 2012-11-15 12:24:19 UTC
update NetworkManager to 0.9.6.4-2.fc17 version

Package: (null)
OS Release: Fedora release 17 (Beefy Miracle)

Comment 5 Fedora Update System 2012-11-21 11:53:44 UTC
selinux-policy-3.10.0-161.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-161.fc17

Comment 6 Fedora Update System 2012-11-22 03:55:48 UTC
Package selinux-policy-3.10.0-161.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.10.0-161.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-18787/selinux-policy-3.10.0-161.fc17
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2012-12-20 15:36:54 UTC
selinux-policy-3.10.0-161.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.