Bug 877139 - SELinux is preventing firewalld from 'getattr' accesses on the file /etc/hosts.
Summary: SELinux is preventing firewalld from 'getattr' accesses on the file /etc/hosts.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 17
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:0b0001d9df6f9069a43360567ad...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-15 19:25 UTC by Bruce-Robert Pocock
Modified: 2012-12-20 16:11 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-12-20 16:11:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: type (9 bytes, text/plain)
2012-11-15 19:25 UTC, Bruce-Robert Pocock
no flags Details
File: hashmarkername (14 bytes, text/plain)
2012-11-15 19:25 UTC, Bruce-Robert Pocock
no flags Details

Description Bruce-Robert Pocock 2012-11-15 19:25:35 UTC
Description of problem:
Possibly occurred as a side-effect of searching for an mDNS-advertised printer?

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

description:
:This would appear to either be a firewalld error, or a policy error, but I'm not inclined to wager which…
:
:SELinux is preventing firewalld from 'getattr' accesses on the file /etc/hosts.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that firewalld should be allowed getattr access on the hosts file 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 firewalld /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:firewalld_t:s0
:Target Context                system_u:object_r:net_conf_t:s0
:Target Objects                /etc/hosts [ file ]
:Source                        firewalld
:Source Path                   firewalld
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           
:Target RPM Packages           setup-2.8.48-1.fc17.noarch
: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.3-1.fc17.x86_64 #1 SMP Mon Oct
:                              22 15:32:35 UTC 2012 x86_64 x86_64
:Alert Count                   2
:First Seen                    2012-11-06 13:57:39 EST
:Last Seen                     2012-11-06 13:57:39 EST
:Local ID                      c8f8d141-52fc-4a32-96bb-d536a08e680f
:
:Raw Audit Messages
:type=AVC msg=audit(1352228259.870:29): avc:  denied  { getattr } for  pid=894 comm="firewalld" path="/etc/hosts" dev="dm-2" ino=131124 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:net_conf_t:s0 tclass=file
:
:
:Hash: firewalld,firewalld_t,net_conf_t,file,getattr
:
:audit2allow
:
:#============= firewalld_t ==============
:allow firewalld_t net_conf_t:file getattr;
:
:audit2allow -R
:
:#============= firewalld_t ==============
:allow firewalld_t net_conf_t:file getattr;
:

Comment 1 Bruce-Robert Pocock 2012-11-15 19:25:38 UTC
Created attachment 645850 [details]
File: type

Comment 2 Bruce-Robert Pocock 2012-11-15 19:25:39 UTC
Created attachment 645851 [details]
File: hashmarkername

Comment 3 Miroslav Grepl 2012-11-19 10:18:14 UTC
Added.

commit 41b42cf40e4892078fa5e4b56a962d230aa4cd19
Author: Miroslav Grepl <mgrepl>
Date:   Mon Nov 19 11:16:08 2012 +0100

    Allow firewalld to read /etc/hosts

Comment 4 Fedora Update System 2012-11-21 11:54:35 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 5 Fedora Update System 2012-11-22 03:56:53 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 6 Fedora Update System 2012-12-20 16:11:22 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.


Note You need to log in before you can comment on or make changes to this bug.