Bug 1994141
| Summary: | assertion on python3-nftables after it pass nft.json_validate | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Paulo Andrade <pandrade> |
| Component: | nftables | Assignee: | Phil Sutter <psutter> |
| Status: | CLOSED ERRATA | QA Contact: | qe-baseos-daemons |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.4 | CC: | egarver, psutter, todoleza |
| Target Milestone: | beta | Keywords: | Triaged, Upstream |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | nftables-0.9.3-22.el8 | Doc Type: | No Doc Update |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-05-10 15:17:29 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: | |||
| Bug Blocks: | 2006093 | ||
|
Description
Paulo Andrade
2021-08-16 20:45:51 UTC
Quite probably fixed by this upstream commit:
commit 2f89bc258e6e06ec4eeccc9efa52f01b4118e359
Refs: v0.9.8-25-g2f89bc258e6e
Author: Phil Sutter <phil>
AuthorDate: Tue Jan 26 18:52:15 2021 +0100
Commit: Phil Sutter <phil>
CommitDate: Tue Feb 9 17:00:09 2021 +0100
erec: Sanitize erec location indesc
erec_print() unconditionally dereferences erec->locations->indesc, so
make sure it is valid when either creating an erec or adding a location.
Signed-off-by: Phil Sutter <phil>
(In reply to Eric Garver from comment #1) > Quite probably fixed by this upstream commit: > > commit 2f89bc258e6e06ec4eeccc9efa52f01b4118e359 > Refs: v0.9.8-25-g2f89bc258e6e > Author: Phil Sutter <phil> > AuthorDate: Tue Jan 26 18:52:15 2021 +0100 > Commit: Phil Sutter <phil> > CommitDate: Tue Feb 9 17:00:09 2021 +0100 > > erec: Sanitize erec location indesc > > erec_print() unconditionally dereferences erec->locations->indesc, so > make sure it is valid when either creating an erec or adding a location. > > Signed-off-by: Phil Sutter <phil> Does not work. Might need extra intermediate patches. Fix sent upstream: https://lore.kernel.org/netfilter-devel/20210901145819.22567-1-phil@nwl.cc/ It applies to RHEL8 and fixes the issue. Thanks for the nice report, Paulo! Upstream commit to backport:
commit 9fe5d1bc18cfaed2ecf717e3dd9a97ff5b0e183c
Author: Phil Sutter <phil>
Date: Wed Sep 1 16:41:44 2021 +0200
parser_json: Fix error reporting for invalid syntax
Errors emitted by the JSON parser caused BUG() in erec_print() due to
input descriptor values being bogus.
Due to lack of 'include' support, JSON parser uses a single input
descriptor only and it lived inside the json_ctx object on stack of
nft_parse_json_*() functions.
By the time errors are printed though, that scope is not valid anymore.
Move the static input descriptor object to avoid this.
Fixes: 586ad210368b7 ("libnftables: Implement JSON parser")
Signed-off-by: Phil Sutter <phil>
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-2022:2004 |