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.
+++ This bug was initially created as a clone of Bug #2061917 +++
The respective kernel commit is about to be reverted as it might break a corner-case:
https://lore.kernel.org/netfilter-devel/20220308125924.6708-1-fw@strlen.de/
Deploy an equivalent mitigation in user space so at least new setups are fine once the revert reaches distribution kernels:
@@ -18,13 +18,21 @@ table ip nftables_svc {
elements = { 192.168.122.0/24 }
}
+ # force port randomization for non-locally originated connections using
+ # suspicious port values to prevent port-shadow attacks, i.e.
+ # accidental matching of new inbound connections vs. existing ones
+ chain do_masquerade {
+ meta iif > 0 th sport < 16384 th dport >= 32768 masquerade random
+ masquerade
+ }
+
# base-chain to manipulate conntrack in postrouting,
# will see packets for new or related traffic only
chain POSTROUTING {
type nat hook postrouting priority srcnat + 20
policy accept
- iifname @masq_interfaces oifname != @masq_interfaces masquerade
- ip saddr @masq_ips masquerade
+ iifname @masq_interfaces oifname != @masq_interfaces jump do_masquerade
+ ip saddr @masq_ips jump do_masquerade
}
}
--- Additional comment from Phil Sutter on 2022-03-08 18:22:30 UTC ---
For reference, this is about CVE-2021-3773:
https://access.redhat.com/security/cve/CVE-2021-3773https://www.openwall.com/lists/oss-security/2021/09/08/3https://breakpointingbad.com/2021/09/08/Port-Shadows-via-Network-Alchemy.html
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 (nftables bug fix and enhancement update), 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-2023:0950