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 1801834 - Fix iptables-restore --noflush with empty lines in input
Summary: Fix iptables-restore --noflush with empty lines in input
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: iptables
Version: 8.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.2
Assignee: Phil Sutter
QA Contact: Jiri Peska
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-11 17:28 UTC by Phil Sutter
Modified: 2023-02-12 20:47 UTC (History)
3 users (show)

Fixed In Version: iptables-1.8.4-8.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 17:00:30 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Netfilter 1400 0 None None None 2020-02-14 15:47:49 UTC
Red Hat Issue Tracker RHELPLAN-37388 0 None None None 2023-02-12 20:47:39 UTC
Red Hat Product Errata RHEA-2020:1889 0 None None None 2020-04-28 17:00:39 UTC

Description Phil Sutter 2020-02-11 17:28:38 UTC
Same problem as described here:

https://bugzilla.netfilter.org/show_bug.cgi?id=1400

Fix sent upstream: 

https://lore.kernel.org/netfilter-devel/20200211170913.2374-1-phil@nwl.cc/

Comment 1 Phil Sutter 2020-02-12 14:19:23 UTC
Upstream commit to backport:

commit 8e76391096f12212985c401ee83a67990aa27a29 (HEAD -> upstream, origin-rw/master)
Author: Phil Sutter <phil>
Date:   Tue Feb 11 16:52:59 2020 +0100

    xtables-restore: fix for --noflush and empty lines
    
    Lookahead buffer used for cache requirements estimate in restore
    --noflush separates individual lines with nul-chars. Two consecutive
    nul-chars are interpreted as end of buffer and remaining buffer content
    is skipped.
    
    Sadly, reading an empty line (i.e., one containing a newline character
    only) caused double nul-chars to appear in buffer as well, leading to
    premature stop when reading cached lines from buffer.
    
    To fix that, make use of xtables_restore_parse_line() skipping empty
    lines without calling strtok() and just leave the newline character in
    place. A more intuitive approach, namely skipping empty lines while
    buffering, is deliberately not chosen as that would cause wrong values
    in 'line' variable.
    
    Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1400
    Fixes: 09cb517949e69 ("xtables-restore: Improve performance of --noflush operation")
    Signed-off-by: Phil Sutter <phil>
    Acked-by: Arturo Borrero Gonzalez <arturo>

Comment 8 errata-xmlrpc 2020-04-28 17:00:30 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/RHEA-2020:1889


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