]> git.ipfire.org Git - thirdparty/nftables.git/commit
evaluate: don't crash if object map does not refer to a value
authorFlorian Westphal <fw@strlen.de>
Wed, 20 Dec 2023 10:06:04 +0000 (11:06 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 22 Jan 2025 23:41:53 +0000 (00:41 +0100)
commit1c71dbf919e1f51550b970b2720aa47340984641
treead1b82780487c0bef9300a54b7d0aa0f82d12f9c
parent876efa9e6b47d6e6606931ed4168a35a7365506e
evaluate: don't crash if object map does not refer to a value

commit 588470e00539404fd793fe22718067721f5754be upstream.

Before:
BUG: Value export of 512 bytes would overflownft: src/netlink.c:474: netlink_gen_prefix: Assertion `0' failed.

After:
66: Error: Object mapping data should be a value, not prefix
synproxy name ip saddr map { 192.168.1.0/24 : "v*" }

Signed-off-by: Florian Westphal <fw@strlen.de>
src/evaluate.c
tests/shell/testcases/bogons/nft-f/objmap_to_prefix_assert [new file with mode: 0644]