Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1418391

Summary: Firewalld update to 0.4.4 needs selinux-policy update
Product: Red Hat Enterprise Linux 7 Reporter: Thomas Woerner <twoerner>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: high Docs Contact:
Priority: high    
Version: 7.3CC: bartz, lvrabec, mgrepl, mmalik, plautrba, pvrabec, ssekidde, twoerner, zpytela
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.13.1-118.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 15:22:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1414584    

Description Thomas Woerner 2017-02-01 17:38:14 UTC
Description of problem:

firewalld needs to be able to identify netfilter helpers. For this is needs to be able to getattr, open, search and read modules_object_t:dir.

Version-Release number of selected component (if applicable):
selinux-policy-3.13.1-102.el7_3.13.noarch

How reproducible:
Always

Actual results:

type=AVC msg=audit(1485969134.528:86): avc:  denied  { search } for  pid=600 comm="firewalld" name="modules" dev="vda1" ino=1251755 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:modules_object_t:s0 tclass=dir

Additional info:

The fix has been merged into fedora-selinux: https://github.com/fedora-selinux/selinux-policy/pull/171

Comment 1 Milos Malik 2017-02-01 18:56:51 UTC
Could you collect all SELinux denials that are triggered by the 0.4.4 firewalld?

# ausearch -m avc -m user_avc -m selinux_err -m user_selinux_err -i -ts today

Thanks.

Comment 2 Thomas Woerner 2017-02-02 12:28:24 UTC
These are the related AVC messages gathered by deactivating dontaudit and allowing one after the other with the command 

# ausearch -m avc -m user_avc -m selinux_err -m user_selinux_err -i -ts today | grep firewalld  | grep module

type=AVC msg=audit(02/02/2017 11:21:30.454:1092) : avc:  denied  { search } for  pid=7323 comm=firewalld name=modules dev="vda1" ino=1251755 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:modules_object_t:s0 tclass=dir 
type=AVC msg=audit(02/02/2017 11:25:39.678:1217) : avc:  denied  { getattr } for  pid=8039 comm=firewalld path=/usr/lib/modules/3.10.0-514.2.2.el7.x86_64/kernel/net/netfilter dev="vda1" ino=25892966 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:modules_object_t:s0 tclass=dir 
type=AVC msg=audit(02/02/2017 11:26:35.079:1322) : avc:  denied  { read } for  pid=8335 comm=firewalld name=netfilter dev="vda1" ino=25892966 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:modules_object_t:s0 tclass=dir 
type=AVC msg=audit(02/02/2017 11:27:24.426:1372) : avc:  denied  { open } for  pid=8570 comm=firewalld path=/usr/lib/modules/3.10.0-514.2.2.el7.x86_64/kernel/net/netfilter dev="vda1" ino=25892966 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:modules_object_t:s0 tclass=dir 
allow firewalld_t modules_object_t:dir { getattr open read search };

Comment 5 Lukas Vrabec 2017-02-08 14:38:38 UTC
*** Bug 1419957 has been marked as a duplicate of this bug. ***

Comment 9 errata-xmlrpc 2017-08-01 15:22:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1861