netfilter: ip6_tables: zero-initialize fragment offset
authorJeremy Sowden <jeremy@azazel.net>
Sun, 12 Sep 2021 21:24:33 +0000 (22:24 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 15 Sep 2021 15:00:28 +0000 (17:00 +0200)
commit310e2d43c3ad429c1fba4b175806cf1f55ed73a6
tree37b5356573dcc2d35b983a5c68cbaf2f20efa3a5
parent69e73dbfda14fbfe748d3812da1244cce2928dcb
netfilter: ip6_tables: zero-initialize fragment offset

ip6tables only sets the `IP6T_F_PROTO` flag on a rule if a protocol is
specified (`-p tcp`, for example).  However, if the flag is not set,
`ip6_packet_match` doesn't call `ipv6_find_hdr` for the skb, in which
case the fragment offset is left uninitialized and a garbage value is
passed to each matcher.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Reviewed-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/ipv6/netfilter/ip6_tables.c