netfilter: ipv4: fix NULL dereference
authorLiping Zhang <liping.zhang@spreadtrum.com>
Sat, 26 Mar 2016 08:32:57 +0000 (16:32 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 28 Mar 2016 15:59:29 +0000 (17:59 +0200)
commit29421198c3a860092e27c2ad8499dfe603398817
tree71294f8a20e10d1ca420d72452d4cfb9a37c3799
parentb301f2538759933cf9ff1f7c4f968da72e3f0757
netfilter: ipv4: fix NULL dereference

Commit fa50d974d104 ("ipv4: Namespaceify ip_default_ttl sysctl knob")
use sock_net(skb->sk) to get the net namespace, but we can't assume
that sk_buff->sk is always exist, so when it is NULL, oops will happen.

Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com>
Reviewed-by: Nikolay Borisov <kernel@kyup.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/bridge/netfilter/nft_reject_bridge.c
net/ipv4/netfilter/ipt_SYNPROXY.c