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 1999102

Summary: firewalld fails to insert nf_nat_ftp module
Product: Red Hat Enterprise Linux 9 Reporter: Štěpán Němec <snemec>
Component: firewalldAssignee: Eric Garver <egarver>
Status: CLOSED CURRENTRELEASE QA Contact: Tomas Dolezal <todoleza>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: egarver, lvrabec, mmalik, pvlasin, snemec, ssekidde, todoleza
Target Milestone: rcKeywords: Triaged, Upstream
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: firewalld-1.0.0-3.el9_b Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1999152 2002783 2003008 (view as bug list) Environment:
Last Closed: 2021-11-22 15:18:28 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: 1999152    
Bug Blocks: 2002783, 2003008    

Description Štěpán Němec 2021-08-30 12:19:38 UTC
Description of problem:
With default capabilities (NET_ADMIN, NET_RAW), firewalld
is unable to insert nf_nat_ftp module when activating the ftp service.

Version-Release number of selected component (if applicable):
firewalld-1.0.0-2.el9

How reproducible:
Always.

Steps to Reproduce:
1. start firewalld with --debug
2. firewall-cmd --add-service ftp
3. /var/log/firewalld contains "modprobe: ERROR: could not insert 'nf_nat_ftp': Operation not permitted"

Actual results:
[root@ci-vm-10-0-137-226 ~]# rpm -q selinux-policy firewalld
selinux-policy-34.1.14-1.el9.noarch
firewalld-1.0.0-2.el9.noarch
[root@ci-vm-10-0-137-226 ~]# sed -i -e 's/^\(FIREWALLD_ARGS=\).*$/\1--debug/' /etc/sysconfig/firewalld
[root@ci-vm-10-0-137-226 ~]# cat /etc/sysconfig/firewalld
# firewalld command line args
# possible values: --debug
FIREWALLD_ARGS=--debug
[root@ci-vm-10-0-137-226 ~]# systemctl start firewalld
[root@ci-vm-10-0-137-226 ~]# firewall-cmd --add-service ftp
success
[root@ci-vm-10-0-137-226 ~]# grep ERROR /var/log/firewalld
2021-08-30 07:41:53 DEBUG1: modprobe: ERROR: could not insert 'nf_nat_ftp': Operation not permitted


Expected results:
The module insertion succeeds.

Additional info:
When firewalld runs with full capabilities the problem does not occur (the module is inserted successfully).

Comment 1 Eric Garver 2021-08-30 14:07:47 UTC
So we do need CAP_SYS_MODULE in RHEL-9. I'm passing this to selinux-policy so they can update the firewalld policy.

Comment 2 Eric Garver 2021-08-30 14:13:12 UTC
(In reply to Eric Garver from comment #1)
> So we do need CAP_SYS_MODULE in RHEL-9. I'm passing this to selinux-policy
> so they can update the firewalld policy.

My bad. We still nede the firewalld bug to backport:

  13801962073f ("fix(firewalld): keep linux capability CAP_SYS_MODULE")