]> asedeno.scripts.mit.edu Git - linux.git/commit
netfilter: ctnetlink: avoid null pointer dereference
authorFlorian Westphal <fw@strlen.de>
Mon, 11 Jun 2018 20:22:19 +0000 (22:22 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 12 Jun 2018 17:31:07 +0000 (19:31 +0200)
commitc05a45c0865d986a8aea373cd5297dbfded6882e
tree106b985b3dc7d29d872bef4436116838b88cc166
parentadc972c5b88829d38ede08b1069718661c7330ae
netfilter: ctnetlink: avoid null pointer dereference

Dan Carpenter points out that deref occurs after NULL check, we should
re-fetch the pointer and check that instead.

Fixes: 2c205dd3981f7 ("netfilter: add struct nf_nat_hook and use it")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_netlink.c