]> git.ipfire.org Git - thirdparty/nftables.git/commit
parser_bison: reject non-serializeable typeof expressions
authorFlorian Westphal <fw@strlen.de>
Sun, 16 Mar 2025 21:39:10 +0000 (22:39 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 27 Jul 2025 18:23:37 +0000 (20:23 +0200)
commitdf54222b7ca053f4464eb2a724504fc2c3a5e50e
tree83fa42e681121ecd4a82896291f8c1ea59b71b89
parent1363a48ad440d563cc3862b335d8e7efec2d1a1d
parser_bison: reject non-serializeable typeof expressions

commit a1bb1814148c5011d50cb566a92b3b30fff118b0 upstream.

Included bogon asserts with:
BUG: unhandled key type 13
nft: src/intervals.c:73: setelem_expr_to_range: Assertion `0' failed.

This should be rejected at parser stage, but the check for udata
support was only done on the first item in a concatenation.

After fix, parser rejects this with:
Error: primary expression type 'symbol' lacks typeof serialization

Fixes: 6e48df5329ea ("src: add "typeof" build/parse/print support")
Signed-off-by: Florian Westphal <fw@strlen.de>
src/parser_bison.y
tests/shell/testcases/bogons/nft-f/typeof_map_with_plain_integer_assert [new file with mode: 0644]