mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 23:24:50 +00:00
netfilter: nft_tunnel: fix null-attribute check
commit1c702bf902
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:aaecfdb5c5
("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>
This commit is contained in:
parent
cbc01968ae
commit
3d49538869
1 changed files with 1 additions and 1 deletions
|
@ -76,7 +76,7 @@ static int nft_tunnel_get_init(const struct nft_ctx *ctx,
|
|||
struct nft_tunnel *priv = nft_expr_priv(expr);
|
||||
u32 len;
|
||||
|
||||
if (!tb[NFTA_TUNNEL_KEY] &&
|
||||
if (!tb[NFTA_TUNNEL_KEY] ||
|
||||
!tb[NFTA_TUNNEL_DREG])
|
||||
return -EINVAL;
|
||||
|
||||
|
|
Loading…
Reference in a new issue