netfilter: nft_tunnel: fix null-attribute check
authorFlorian Westphal <fw@strlen.de>
Thu, 16 Jan 2020 07:44:11 +0000 (08:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jan 2020 07:22:48 +0000 (08:22 +0100)
commit3d49538869ec7a3434566df64accd6f2d85449e5
treead14ed982f874a0796bb60116c784466c2c10dd8
parentcbc01968ae892a4f587076c6f8c36fb4a86c3995
netfilter: nft_tunnel: fix null-attribute check

commit 1c702bf902bd37349f6d91cd7f4b372b1e46d0ed upstream.

else we get null deref when one of the attributes is missing, both
must be non-null.

Reported-by: syzbot+76d0b80493ac881ff77b@syzkaller.appspotmail.com
Fixes: aaecfdb5c5dd8ba ("netfilter: nf_tables: match on tunnel metadata")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netfilter/nft_tunnel.c