]> git.ipfire.org Git - thirdparty/nftables.git/commit
tcpopt: don't create exthdr expression without datatype
authorFlorian Westphal <fw@strlen.de>
Fri, 15 Dec 2023 12:04:22 +0000 (13:04 +0100)
committerFlorian Westphal <fw@strlen.de>
Tue, 19 Dec 2023 11:04:52 +0000 (12:04 +0100)
commitc9f934ca446de5041ce6f19e4ee6a0c74b120186
tree75a8e01db7ad8ead683f6867bf44458b24ffc4a2
parentdd105cb8adc8c9ece0f23fcd21f92b6839b8650a
tcpopt: don't create exthdr expression without datatype

The reproducer crashes during concat evaluation, as the
exthdr expression lacks a datatype.

This should never happen, i->dtype must be set.

In this case the culprit is tcp option parsing, it will
wire up a non-existent template, because the "nop" option
has no length field (1 byte only).

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