]> git.ipfire.org Git - thirdparty/nftables.git/commit
json: make sure timeout list is initialised
authorFlorian Westphal <fw@strlen.de>
Fri, 21 Mar 2025 11:53:40 +0000 (12:53 +0100)
committerFlorian Westphal <fw@strlen.de>
Fri, 21 Mar 2025 14:16:05 +0000 (15:16 +0100)
commit0298bc012e020b2fca8ecc60b0091798d091e1fd
tree63fd30dacddccdad00d9bafbef950df7b8484730
parent1f3d0b9cf9cc823c1f747650a84f1b43817d460f
json: make sure timeout list is initialised

On parser error, obj_free will iterate this list.
Included json bogon crashes due to null deref because
list head initialisation did not yet happen.

Fixes: c82a26ebf7e9 ("json: Add ct timeout support")
Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/parser_json.c
tests/shell/testcases/bogons/assert_failures
tests/shell/testcases/bogons/nft-j-f/ct_timeout_null_crash [new file with mode: 0644]