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 1628278 - Option --check-config does not check validity of the rich rules inside xml.
Summary: Option --check-config does not check validity of the rich rules inside xml.
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: firewalld
Version: 8.2
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.3
Assignee: Eric Garver
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 1477771
TreeView+ depends on / blocked
 
Reported: 2018-09-12 16:00 UTC by Jiri Peska
Modified: 2021-01-08 07:35 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1477771
Environment:
Last Closed: 2021-01-08 07:35:45 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jiri Peska 2018-09-12 16:00:35 UTC
Description of problem:
Option --check-config of firewall-cmd should check validity of rules located inside .xml files, but it seems that it is struggling when checking rich rules.
When valid rich rule is added via command and address is invalidated manually inside .xml, --check-config should throw error, when it finds invalid address, but it returns success.
Check should return same error as error returned by command, where invalid address is written directly in the command.

Version-Release number of selected component (if applicable):
firewalld-0.5.3-5.el7

How reproducible:
everytime

Steps to Reproduce:
1. Add valid rule:
firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="192.168.1.1" service name="tftp" log prefix="tftp" level="info" limit value="1/m" accept'
2. Manually change address "192.168.1.1" to something invalid (e.g.: 192.abc.invalid.1 ) inside /etc/firewalld/zone/public.xml
3. Run command:
firewall-cmd --check-config

1. Same for family="ipv6" and providing invalid ipv6 address (e.g.: 3001::2::2::7334)

Actual results:
success

Expected results:
Option --check-config should throw error: INVALID_ADDR, when invalid address exists in rich rule inside xml just as throws error when the rule is added via command (e.g.: 
firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="invalid.ipv4.address" service name="tftp" log prefix="tftp" level="info" limit value="1/m" accept'
)

Additional info:
Adding invalid rule manually:
firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv6" source address="2001::8a20::7334" service name="tftp" log prefix="tftp" level="info" limit value="1/m" accept'
Error: INVALID_ADDR: 2001::8a20::7334
Throws error as expected.

Comment 3 Eric Garver 2020-05-07 17:28:50 UTC
This is a minor issue and there are no plans to fix this in RHEL-7. Moving to RHEL-8.

Comment 7 RHEL Program Management 2021-01-08 07:35:45 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.


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