Bug 1469806

Summary: SELinux is preventing firewalld from 'relabelto' accesses on the file ifcfg-enp0s25.bak.
Product: [Fedora] Fedora Reporter: Matthias Eliasson <matthias.eliasson>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: alexthomas, andre.ocosta, bart.scheerlinck, chris, dominick.grift, dwalsh, fredoche, jniederm, kristian.frantti, leandropanhan, lilicenco.work, lvrabec, mail, maxaxiom, mcatanzaro, mgrepl, mihai.l.lalescu, mikhail.v.gavrilov, ntrrgc, okrh, plautrba, pmoore, p.zaskorski, rleitao, sheepdestroyer, ssekidde, t01012100, yuping.zuo+k4lb4l
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:c72888503d7256c35f245aa02dc62714b067dd579b221462a79f28919b902018;VARIANT_ID=workstation;
Fixed In Version: selinux-policy-3.13.1-260.14.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-15 20:10:47 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 Matthias Eliasson 2017-07-11 21:24:47 UTC
Description of problem:
SELinux is preventing firewalld from 'relabelto' accesses on the file ifcfg-enp0s25.bak.

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

If you believe that firewalld should be allowed relabelto access on the ifcfg-enp0s25.bak 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:
# ausearch -c 'firewalld' --raw | audit2allow -M my-firewalld
# semodule -X 300 -i my-firewalld.pp

Additional Information:
Source Context                system_u:system_r:firewalld_t:s0
Target Context                unconfined_u:object_r:net_conf_t:s0
Target Objects                ifcfg-enp0s25.bak [ file ]
Source                        firewalld
Source Path                   firewalld
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-259.fc26.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.11.8-300.fc26.x86_64 #1 SMP Thu
                              Jun 29 20:09:48 UTC 2017 x86_64 x86_64
Alert Count                   1
First Seen                    2017-07-11 23:17:06 CEST
Last Seen                     2017-07-11 23:17:06 CEST
Local ID                      2f60dfc7-0b35-4ec3-8ada-ef915b1f9c7d

Raw Audit Messages
type=AVC msg=audit(1499807826.823:456): avc:  denied  { relabelto } for  pid=851 comm="firewalld" name="ifcfg-enp0s25.bak" dev="dm-0" ino=2756989 scontext=system_u:system_r:firewalld_t:s0 tcontext=unconfined_u:object_r:net_conf_t:s0 tclass=file permissive=0


Hash: firewalld,firewalld_t,net_conf_t,file,relabelto

Version-Release number of selected component:
selinux-policy-3.13.1-259.fc26.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.11.8-300.fc26.x86_64
type:           libreport

Potential duplicate: bug 1364992

Comment 1 bart.scheerlinck 2017-07-12 07:39:47 UTC
Description of problem:
I installed steam using the RPMfusion repo's, no errors, but this appeared.

Version-Release number of selected component:
selinux-policy-3.13.1-259.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.11.9-300.fc26.x86_64
type:           libreport

Comment 2 Max Axiom 2017-07-21 18:58:03 UTC
*** Bug 1473817 has been marked as a duplicate of this bug. ***

Comment 3 jniederm 2017-07-26 14:18:26 UTC
Description of problem:
$ sudo firewall-cmd --permanent --zone=trusted --add-interface=virbr0
$ sudo firewall-cmd --reload

Version-Release number of selected component:
selinux-policy-3.13.1-260.1.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.11.11-300.fc26.x86_64
type:           libreport

Comment 4 Dean Hunter 2017-07-26 17:09:03 UTC
Description of problem:
I was configuring xrdp for testing in a gnome-boxes VM newly created from Fedora-Workstation-Live-x86_64-26-1.
I applied all available updates then started installing and configuring xrdp.

"sudo firewall-cmd --add-port=3389/tcp --permanent" completed successfully.
"sudo firewall-cmd --reload" appears to have triggered the SELinux alert.

Version-Release number of selected component:
selinux-policy-3.13.1-260.1.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.11.11-300.fc26.x86_64
type:           libreport

Comment 5 Daniel Snider 2017-07-30 07:59:19 UTC
Description of problem:
I added a new firewalld service and added a tcp port to it. I then removed port 22/tcp from the 'ssh' service and added a different port to it. Then I added my new service to the 'drop' zone. Now when I reload firewalld I receive the attached SELinux alert.

Version-Release number of selected component:
selinux-policy-3.13.1-260.3.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.11.11-300.fc26.x86_64
type:           libreport

Comment 6 Andre Costa 2017-08-07 21:03:53 UTC
Description of problem:
I was trying to configure a network printer

Version-Release number of selected component:
selinux-policy-3.13.1-260.3.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.11.11-300.fc26.x86_64
type:           libreport

Comment 7 John Freed 2017-08-11 18:18:59 UTC
Description of problem:
Pretty sure this was the order of events ...

1) opened firewall-config GUI
2) used CLI firewall-cmd --permanent to update rich rules (because I couldn't figure out the GUI)
3) reloaded firewalld from GUI - got SELinux error 

Version-Release number of selected component:
selinux-policy-3.13.1-260.3.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.11.8-300.fc26.x86_64
type:           libreport

Comment 8 Tarik 2017-08-24 19:18:22 UTC
Description of problem:
Using firewall-cmd I wanted to remove network interface from default zone and bind it to another zone.
After I had done reconfiguration this SElinux alert appeared. But I am not sure about exact steps. I think I was doing that with sudo command. 

Version-Release number of selected component:
selinux-policy-3.13.1-259.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.5-300.fc26.x86_64
type:           libreport

Comment 9 fred 2017-09-11 12:29:47 UTC
Description of problem:
was installing cockpit

Version-Release number of selected component:
selinux-policy-3.13.1-260.8.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.9-300.fc26.x86_64
type:           libreport

Comment 10 Mihai L Lalescu 2017-09-15 23:46:09 UTC
Description of problem:
After connecting to the secure etherenet connection 802.1x I am getting this error. I am not sure if this is related or not but my secure etherenet connection is no longer working. Imediately after connecting for 4 or 5 seconds I do have conectivity. After that connectivity is lost even ping to the GW stops working. If I disconnect and reconnect again for a few seconds I do have connectivity.

Version-Release number of selected component:
selinux-policy-3.13.1-260.8.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.12-300.fc26.x86_64
type:           libreport

Comment 11 Yuping Zuo 2017-10-01 17:49:32 UTC
Description of problem:
Steps to reproduce:
1. permanently add an interface to a non-default zone with firewall-config
  a)with firewall-cmd, it says "The interface is under control of NetworkManager, setting zone to 'internal'. success", and ifcfg is updated accordingly.
  b)but with firewall-config, it adds the interface to /etc/firewalld/zones/<zone>.xml, which will result in the bug upon reloading firewalld.
2. reload firewalld either with firewall-config or with firewall-cmd

Environment:
kernel.x86_64                              4.12.14-300.fc26
firewall-config.noarch                     0.4.4.5-1.fc26
firewalld.noarch                           0.4.4.5-1.fc26
libselinux.x86_64                          2.6-7.fc26
selinux-policy.noarch                      3.13.1-260.9.fc26

Version-Release number of selected component:
selinux-policy-3.13.1-260.9.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.14-300.fc26.x86_64
type:           libreport

Comment 12 Lukas Vrabec 2017-10-02 09:43:51 UTC
*** Bug 1404956 has been marked as a duplicate of this bug. ***

Comment 13 sheepdestroyer 2017-10-04 03:09:38 UTC
Description of problem:
i did : sudo dnf install cockpit

Version-Release number of selected component:
selinux-policy-3.13.1-260.10.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.14-300.fc26.x86_64
type:           libreport

Comment 14 Alicia Boya GarcĂ­a 2017-10-17 00:47:49 UTC
Description of problem:
Last time I got the error when executing:

$ sudo dnf install steam

(steam here is a package from rpmfusion-nonfree)

This is not the first time I've seen this alert... I'm under the impression that whenever a package tries to open some ports during the installation script it gets blocked by SELinux.

Version-Release number of selected component:
selinux-policy-3.13.1-260.10.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.13.5-200.fc26.x86_64
type:           libreport

Comment 15 Fedora Update System 2017-10-26 12:31:31 UTC
selinux-policy-3.13.1-260.14.fc26 has been pushed to the Fedora 26 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-2017-d312739a4e

Comment 16 Fedora Update System 2017-11-15 20:10:47 UTC
selinux-policy-3.13.1-260.14.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.