]> 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)
committerFlorian Westphal <fw@strlen.de>
Thu, 20 Mar 2025 08:23:24 +0000 (09:23 +0100)
commita1bb1814148c5011d50cb566a92b3b30fff118b0
treebb3bca75b398acccc25da95f760ce5a3317f9f49
parent2486fe3ae53385b29a3a29c8a2a0c8999e85a322
parser_bison: reject non-serializeable typeof expressions

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]