]> git.baikalelectronics.ru Git - kernel.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)
commit9a92af0130e15869633d7e84ef54f4f9e53cb81a
tree106b985b3dc7d29d872bef4436116838b88cc166
parent3cc5405cab05095d9937e8874ccb8971cd7b834a
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: 912ce233baa29 ("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