Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1512560 - SELinux is preventing firewalld from 'map' accesses on the device /dev/vda1.
Summary: SELinux is preventing firewalld from 'map' accesses on the device /dev/vda1.
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-13 14:17 UTC by Michal Ambroz
Modified: 2018-11-30 22:38 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.13.1-283.16.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-30 22:38:26 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
firewalld.log (183.99 KB, text/plain)
2017-11-22 19:15 UTC, Michal Ambroz
no flags Details

Description Michal Ambroz 2017-11-13 14:17:10 UTC
===== Description of problem:
After upgrade from Fedora 26 to Fedora 27 (Beta at the moment)  The firewalld service stopped to working due to selinux permissions. 
I did try to runt the restorecon on all the  firewalld files , but it didn't helped.

===== How reproducible:
100%

===== Steps to Reproduce:

# service firewalld stop
Redirecting to /bin/systemctl stop firewalld.service
# service firewalld start
Redirecting to /bin/systemctl start firewalld.service
Job for firewalld.service failed because a fatal signal was delivered to the control process.
See "systemctl  status firewalld.service" and "journalctl  -xe" for details.


# systemctl  status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
   Active: failed (Result: signal) since Mon 2017-11-13 14:09:10 UTC; 7s ago
     Docs: man:firewalld(1)
  Process: 3487 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=killed, signal=SEGV)
 Main PID: 3487 (code=killed, signal=SEGV)

Nov 13 14:09:10 host.example.com systemd[1]: Starting firewalld - dynamic firewall daemon...
Nov 13 14:09:10 host.example.com systemd[1]: firewalld.service: Main process exited, code=killed, status=11/SEGV
Nov 13 14:09:10 host.example.com systemd[1]: Failed to start firewalld - dynamic firewall daemon.
Nov 13 14:09:10 host.example.com systemd[1]: firewalld.service: Unit entered failed state.
Nov 13 14:09:10 host.example.com systemd[1]: firewalld.service: Failed with result 'signal'.


# journal -xe
Nov 13 14:09:10 host.example.com systemd[1]: Starting firewalld - dynamic firewall daemon...
-- Subject: Unit firewalld.service has begun start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit firewalld.service has begun starting up.
Nov 13 14:09:10 host.example.com audit[3487]: AVC avc:  denied  { map } for  pid=3487 comm="firewalld" path="/usr/bin/python3.6" dev="vda1" ino=53103 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=file permissive=0
Nov 13 14:09:10 host.example.com audit[3487]: ANOM_ABEND auid=4294967295 uid=0 gid=0 ses=4294967295 subj=system_u:system_r:firewalld_t:s0 pid=3487 comm="firewalld" exe="/usr/bin/python3.6" sig=11 res=1
Nov 13 14:09:10 host.example.com audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=firewalld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
Nov 13 14:09:10 host.example.com systemd[1]: firewalld.service: Main process exited, code=killed, status=11/SEGV
Nov 13 14:09:10 host.example.com systemd[1]: Failed to start firewalld - dynamic firewall daemon.
-- Subject: Unit firewalld.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit firewalld.service has failed.
-- 
-- The result is failed.
Nov 13 14:09:10 host.example.com systemd[1]: firewalld.service: Unit entered failed state.
Nov 13 14:09:10 host.example.com systemd[1]: firewalld.service: Failed with result 'signal'.




===== Additional info:
# rpm -q firewalld
firewalld-0.4.4.5-3.fc27.noarch

# rpm -q selinux-policy
selinux-policy-3.13.1-283.14.fc27.noarch

# ls -Z /usr/sbin/firewalld
system_u:object_r:firewalld_exec_t:s0 /usr/sbin/firewalld

# The /dev/vda1 is my root volume mounted as /
# ls -lZ /dev/vda1
brw-rw----. 1 root disk system_u:object_r:fixed_disk_device_t:s0 252, 1 Nov 13 13:23 /dev/vda1

Comment 1 Michal Ambroz 2017-11-13 14:44:29 UTC
Trying firewalld to perform this 'map' access using audit2allow made the firewalld to start:

journalctl  -xe|grep AVC|grep firewall | audit2allow -M firewallmap

semodule -i firewallmap.pp

But it brought some additional selinux errors - mostly access to some temporary files in /dev/mqueue/XXXXXXXXX /var/tmp/XXXXXXXXX /dev/shm/XXXXXXXXX /tmp/XXXXXXXXX:

journalctl -xe|grep firewalld | cut -d ':' -f 4- |sort -u
AVC avc:  denied  { map } for  pid=3884 comm="firewalld" path=2F6465762F6D71756575652F666669334255445343202864656C6574656429 dev="mqueue" ino=89577 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:firewalld_tmpfs_t:s0 tclass=file permissive=0
 AVC avc:  denied  { map } for  pid=3884 comm="firewalld" path=2F6465762F6D71756575652F66666934764333754A202864656C6574656429 dev="mqueue" ino=89688 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:firewalld_tmpfs_t:s0 tclass=file permissive=0
 AVC avc:  denied  { map } for  pid=3884 comm="firewalld" path=2F6465762F6D71756575652F666669374C71744551202864656C6574656429 dev="mqueue" ino=89682 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:firewalld_tmpfs_t:s0 tclass=file permissive=0


AVC avc:  denied  { map } for  pid=3884 comm="firewalld" path=2F6465762F73686D2F66666930776931346D202864656C6574656429 dev="tmpfs" ino=89703 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:firewalld_tmpfs_t:s0 tclass=file permissive=0
 AVC avc:  denied  { map } for  pid=3884 comm="firewalld" path=2F6465762F73686D2F666669314F49423842202864656C6574656429 dev="tmpfs" ino=89613 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:firewalld_tmpfs_t:s0 tclass=file permissive=0
 AVC avc:  denied  { map } for  pid=3884 comm="firewalld" path=2F6465762F73686D2F666669316D39317746202864656C6574656429 dev="tmpfs" ino=89575 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:firewalld_tmpfs_t:s0 tclass=file permissive=0
 AVC avc:  denied  { map } for  pid=3884 comm="firewalld" path=2F6465762F73686D2F666669336268716832202864656C6574656429 dev="tmpfs" ino=89635 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:firewalld_tmpfs_t:s0 tclass=file permissive=0


AVC avc:  denied  { map } for  pid=3884 comm="firewalld" path=2F72756E2F666669315162576777202864656C6574656429 dev="tmpfs" ino=89580 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:firewalld_var_run_t:s0 tclass=file permissive=0
 AVC avc:  denied  { map } for  pid=3884 comm="firewalld" path=2F72756E2F66666931535846797A202864656C6574656429 dev="tmpfs" ino=89615 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:firewalld_var_run_t:s0 tclass=file permissive=0
 AVC avc:  denied  { map } for  pid=3884 comm="firewalld" path=2F72756E2F666669317547626770202864656C6574656429 dev="tmpfs" ino=89660 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:firewalld_var_run_t:s0 tclass=file permissive=0
 AVC avc:  denied  { map } for  pid=3884 comm="firewalld" path=2F72756E2F66666933523549706B202864656C6574656429 dev="tmpfs" ino=89587 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:firewalld_var_run_t:s0 tclass=file permissive=0


AVC avc:  denied  { map } for  pid=3884 comm="firewalld" path=2F746D702F666669335862337A68202864656C6574656429 dev="vda1" ino=2967 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:firewalld_tmp_t:s0 tclass=file permissive=0
 AVC avc:  denied  { map } for  pid=3884 comm="firewalld" path=2F746D702F666669336C53706E51202864656C6574656429 dev="vda1" ino=2967 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:firewalld_tmp_t:s0 tclass=file permissive=0
 AVC avc:  denied  { map } for  pid=3884 comm="firewalld" path=2F746D702F666669356355304670202864656C6574656429 dev="vda1" ino=2967 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:firewalld_tmp_t:s0 tclass=file permissive=0
 AVC avc:  denied  { map } for  pid=3884 comm="firewalld" path=2F746D702F6666693941334D5A78202864656C6574656429 dev="vda1" ino=2967 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:firewalld_tmp_t:s0 tclass=file permissive=0



AVC avc:  denied  { map } for  pid=3884 comm="firewalld" path=2F7661722F746D702F6666693370496F6D61202864656C6574656429 dev="vda1" ino=2967 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:firewalld_tmp_t:s0 tclass=file permissive=0
 AVC avc:  denied  { map } for  pid=3884 comm="firewalld" path=2F7661722F746D702F666669337072477863202864656C6574656429 dev="vda1" ino=2967 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:firewalld_tmp_t:s0 tclass=file permissive=0
 AVC avc:  denied  { map } for  pid=3884 comm="firewalld" path=2F7661722F746D702F66666933747548665A202864656C6574656429 dev="vda1" ino=2967 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:firewalld_tmp_t:s0 tclass=file permissive=0
 AVC avc:  denied  { map } for  pid=3884 comm="firewalld" path=2F7661722F746D702F66666935325A417144202864656C6574656429 dev="vda1" ino=2967 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:firewalld_tmp_t:s0 tclass=file permissive=0


AVC avc:  denied  { write } for  pid=3884 comm="firewalld" name="/" dev="vda1" ino=2 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:root_t:s0 tclass=dir permissive=0


Best regards
Michal Ambroz

Comment 2 Fedora Update System 2017-11-16 15:11:30 UTC
selinux-policy-3.13.1-283.16.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-5178e6a393

Comment 3 Fedora Update System 2017-11-17 18:55:52 UTC
selinux-policy-3.13.1-283.16.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-2017-5178e6a393

Comment 4 Fedora Update System 2017-11-20 16:56:07 UTC
selinux-policy-3.13.1-283.16.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 5 Michal Ambroz 2017-11-22 19:13:44 UTC
Having the selinux-policy-3.13.1-283.16.fc27, but firewalld doesn't start after reboot.

# rpm -q selinux-policy
selinux-policy-3.13.1-283.16.fc27.noarch

# rpm -q firewalld
firewalld-0.4.4.5-3.fc27.noarch

#journalctl  -xe|grep AVC|grep firewall 
Nov 22 18:54:36 hermes.h3x.eu audit[623]: AVC avc:  denied  { map } for  pid=623 comm="firewalld" path="/usr/bin/python3.6" dev="vda1" ino=53103 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=file permissive=0

Seems to be still related to denied map on vda1 device.

After adding that "allow firewalld_t bin_t:file map;" - the firewalld starts, but still is complaining about lots of stuff on root device.
Log attached.

Comment 6 Michal Ambroz 2017-11-22 19:15:26 UTC
Created attachment 1357767 [details]
firewalld.log

firewalld log after install of selinux-policy-3.13.1-283.16.fc27.noarch

Comment 7 Ben Cotton 2018-11-27 14:34:12 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 8 Ben Cotton 2018-11-30 22:38:26 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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