]> git.ipfire.org Git - thirdparty/nftables.git/commit
evaluate: fix bogus assertion failure with boolean datatype
authorFlorian Westphal <fw@strlen.de>
Fri, 8 Dec 2023 18:38:33 +0000 (19:38 +0100)
committerFlorian Westphal <fw@strlen.de>
Tue, 12 Dec 2023 14:20:58 +0000 (15:20 +0100)
commit567937b5560fbcc7f6b74fb43c52e1cab2ac425a
treed0e9098d76e2718bc8ccdd1c23140395f8f285fb
parent130060afa9f6f11e14ea5cf372545407179f16ac
evaluate: fix bogus assertion failure with boolean datatype

The assertion is too strict, as found by afl++:

typeof iifname . ip saddr . meta ipsec
elements = { "eth0" . 10.1.1.2 . 1 }

meta ipsec is boolean (1 bit), but datasize of 1 is set at 8 bit.

Fixes: 22b750aa6dc9 ("src: allow use of base integer types as set keys in concatenations")
Signed-off-by: Florian Westphal <fw@strlen.de>
src/evaluate.c
tests/shell/testcases/sets/dumps/typeof_sets_0.nft
tests/shell/testcases/sets/typeof_sets_0