Bug 1820684
Summary: | nftables segfault on working with non-empty interval sets using rhel-8.1 kernel | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Tomas Dolezal <todoleza> | |
Component: | nftables | Assignee: | Phil Sutter <psutter> | |
Status: | CLOSED ERRATA | QA Contact: | Tomas Dolezal <todoleza> | |
Severity: | high | Docs Contact: | ||
Priority: | high | |||
Version: | 8.2 | CC: | egarver, sbrivio, todoleza, yiche | |
Target Milestone: | rc | Keywords: | ZStream | |
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | nftables-0.9.3-16.el8 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1847553 1854532 (view as bug list) | Environment: | ||
Last Closed: | 2020-11-04 01:58:24 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: | 1847553 | |||
Bug Blocks: | 1802014, 1854532 |
Description
Tomas Dolezal
2020-04-03 15:25:54 UTC
Upstream solved this by re-introducing NFT_SET_CONCAT flag. Backporting this is a combined approach in user space: commit 09441b5e92ceea60198a35cd657904fa7a10ee54 Author: Stefano Brivio <sbrivio> Date: Mon Apr 13 21:48:03 2020 +0200 src: Set NFT_SET_CONCAT flag for sets with concatenated ranges Pablo reports that nft, after commit 8ac2f3b2fca3 ("src: Add support for concatenated set ranges"), crashes with older kernels (< 5.6) without support for concatenated set ranges: those sets will be sent to the kernel, which adds them without notion of the fact that different concatenated fields are actually included, and nft crashes while trying to list this kind of malformed concatenation. Use the NFT_SET_CONCAT flag introduced by kernel commit ef516e8625dd ("netfilter: nf_tables: reintroduce the NFT_SET_CONCAT flag") when sets including concatenated ranges are sent to the kernel, so that older kernels (with no knowledge of this flag itself) will refuse set creation. Note that, in expr_evaluate_set(), we have to check for the presence of the flag, also on empty sets that might carry it in context data, and actually set it in the actual set flags. Reported-by: Pablo Neira Ayuso <pablo> Signed-off-by: Stefano Brivio <sbrivio> Signed-off-by: Pablo Neira Ayuso <pablo> and kernel space: commit ef516e8625ddea90b3a0313f3a0b0baa83db7ac2 Author: Pablo Neira Ayuso <pablo> Date: Tue Apr 7 14:10:38 2020 +0200 netfilter: nf_tables: reintroduce the NFT_SET_CONCAT flag Stefano originally proposed to introduce this flag, users hit EOPNOTSUPP in new binaries with old kernels when defining a set with ranges in a concatenation. Fixes: f3a2181e16f1 ("netfilter: nf_tables: Support for sets with multiple ranged fields") Reviewed-by: Stefano Brivio <sbrivio> Signed-off-by: Pablo Neira Ayuso <pablo> I'll therefore clone this ticket for kernel component to get both into RHEL8.3. 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/RHEA-2020:4535 |