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 1314403 - tc segfaults when printing filters with multiple xt actions attached
Summary: tc segfaults when printing filters with multiple xt actions attached
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: iproute
Version: 7.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Phil Sutter
QA Contact: Marek Marusic
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-03 13:53 UTC by Phil Sutter
Modified: 2016-11-03 23:38 UTC (History)
4 users (show)

Fixed In Version: iproute-3.10.0-61.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 23:38:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1314398 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Product Errata RHEA-2016:2162 0 normal SHIPPED_LIVE iproute bug fix and enhancement update 2016-11-03 13:14:33 UTC

Internal Links: 1314398

Description Phil Sutter 2016-03-03 13:53:34 UTC
To reproduce this issue, attach an ingress qdisc to some interface (veth0 in this case):

# tc qd add dev veth0 ingress handle ffff:

Then add two identical filters, each with xt action:

# tc filter add dev veth0 parent ffff: u32 match u32 0 0 action xt -j LOG
# tc filter add dev veth0 parent ffff: u32 match u32 0 0 action xt -j LOG

Finally try to print the filter list:

# tc filter show dev veth0 parent ffff:

tc will segfault at the last step. The issue has been fixed upstream:

commit 6e2e5ec28bad4561c534adf4f22b2706e385c71d
Author: Andreas Greve <andreas.greve>
Date:   Sat May 10 11:19:18 2014 +0200

    fix print_ipt: segfault if more then one filter with action -j MARK.
    
    BUG: tc filter show ... produce a segmentation fault if more than one
    filter rule with action -j MARK exists.
    
    Reason: In print_ipt(...) xtables will be initialzed with a
    pointer to the static struct tcipt_globals at xtables_init_all().
    Later on the fields .opts and .options_offset of tcipt_globals are
    modified. The call of xtables_free_opts(1) at the end of print(...)
    does not restore the original values of tcipt_globals for the
    modified fields. It only frees some allocated memory and sets
    .opts to NULL. This leads to a segmentation fault when print_ipt()
    is called for the next filter rule with action -j MARK.
    
    Fix: Cloneing tcipt_globals on the stack as tmp_tcipt_globals and
    use it instead of tcipt_globals, so tcipt_globals will be not
    modified.
    
    Signed-off-by: Andreas Greve <andreas.greve>

Comment 5 Phil Sutter 2016-04-12 11:22:31 UTC
Hi Jaroslav,

As discussed with Marek in private, this is a known issue which existed upstream as well. It is tracked in bug 1314398. Thanks for your efforts in tracking this down!

Cheers, Phil

Comment 10 errata-xmlrpc 2016-11-03 23:38:52 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://rhn.redhat.com/errata/RHEA-2016-2162.html


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