Bug 866422

Summary: SELinux is preventing /usr/sbin/dnsmasq from 'search' accesses on the directory /etc/NetworkManager.
Product: [Fedora] Fedora Reporter: Michael S. <misc>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: dominick.grift, dwalsh, mgrepl, sgallagh
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:05:40 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 Michael S. 2012-10-15 10:36:12 UTC
Description of problem:
tried to use a 3g key on a up to date fedora 18. Doesn't seems to appear with regular wifi or wired connexion.
FOr what is worth, here is my NetworkManager.conf :

[main]
dns=dnsmasq
plugins=ifcfg-rh

Since I use dnsmasq as a dns proxy ( to cope with vpn over public wifi with a dns that does redirect on domain not found ), I think this may requires dnsmasq to read some file in the directory, but I do not know why. Things work fine however without the access.


Additional info:
libreport version: 2.0.16
kernel:         3.6.1-1.fc18.x86_64

description:
:SELinux is preventing /usr/sbin/dnsmasq from 'search' accesses on the directory /etc/NetworkManager.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If vous pensez que dnsmasq devrait être autorisé à accéder search sur NetworkManager directory par défaut.
:Then vous devriez rapporter ceci en tant qu'anomalie.
:Vous pouvez générer un module de stratégie local pour autoriser cet accès.
:Do
:autoriser cet accès pour le moment en exécutant :
:# 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                          <Inconnu>
:Host                          (removed)
:Source RPM Packages           dnsmasq-2.59-6.fc18.x86_64
:Target RPM Packages           NetworkManager-0.9.7.0-4.git20121004.fc18.x86_64
:                              puppet-2.7.18-1.fc18.noarch
:                              initscripts-9.41-2.fc18.x86_64
:                              dhclient-4.2.4-18.P2.fc18.x86_64
:Policy RPM                    selinux-policy-3.11.1-36.fc18.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.6.1-1.fc18.x86_64 #1 SMP Mon Oct
:                              8 17:19:09 UTC 2012 x86_64 x86_64
:Alert Count                   18
:First Seen                    2012-10-14 19:11:30 CEST
:Last Seen                     2012-10-15 11:51:05 CEST
:Local ID                      5b86e4a9-571d-4e44-b3f6-b909f6313d91
:
:Raw Audit Messages
:type=AVC msg=audit(1350294665.31:700): avc:  denied  { search } for  pid=5617 comm="dnsmasq" name="NetworkManager" dev="dm-2" ino=2228870 scontext=system_u:system_r:dnsmasq_t:s0 tcontext=system_u:object_r:NetworkManager_etc_t:s0 tclass=dir
:
:
:type=SYSCALL msg=audit(1350294665.31:700): arch=x86_64 syscall=openat success=no exit=EACCES a0=ffffffffffffff9c a1=145eb70 a2=90800 a3=0 items=0 ppid=843 pid=5617 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;
:

Comment 1 Michael S. 2012-10-15 10:36:15 UTC
Created attachment 627293 [details]
File: type

Comment 2 Michael S. 2012-10-15 10:36:17 UTC
Created attachment 627294 [details]
File: hashmarkername

Comment 3 Miroslav Grepl 2012-10-16 11:37:26 UTC
Fixed in selinux-policy-3.11.1-40.fc18.noarch

Comment 4 Michael S. 2012-10-21 09:32:19 UTC
tried to connect to my work VPN, using openvpn and network-manager

Package: (null)
OS Release: Fedora release 18 (Spherical Cow)

Comment 5 Fedora Update System 2012-10-23 20:34:48 UTC
selinux-policy-3.11.1-43.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-43.fc18

Comment 6 Fedora Update System 2012-10-26 15:37:47 UTC
selinux-policy-3.11.1-46.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-46.fc18

Comment 7 Fedora Update System 2012-10-26 19:27:15 UTC
Package selinux-policy-3.11.1-46.fc18:
* should fix your issue,
* was pushed to the Fedora 18 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.11.1-46.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-16862/selinux-policy-3.11.1-46.fc18
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2012-12-20 15:05:43 UTC
selinux-policy-3.11.1-46.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.