netfilter: bridge: fix NULL deref in physin/out ifindex helpers
authorFlorian Westphal <fw@strlen.de>
Mon, 20 Apr 2015 10:35:47 +0000 (12:35 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 24 Apr 2015 18:51:40 +0000 (20:51 +0200)
commit547c4b547e07dcc60874b6ef6252dd49ff74aec1
tree942709ba5115ae7840efc3d71b6093de4b39e575
parent4c4ed0748f82e26d8b884383e6737cf5a861ed6f
netfilter: bridge: fix NULL deref in physin/out ifindex helpers

Might not have an outdev yet. We'll oops when iface goes down while skbs
are still nfqueue'd:

RIP: 0010:[<ffffffff81422a2f>]  [<ffffffff81422a2f>] dev_cmp+0x4f/0x80
nfqnl_rcv_dev_event+0xe2/0x150
notifier_call_chain+0x53/0xa0

Fixes: c737b7c4510026 ("netfilter: bridge: add helpers for fetching physin/outdev")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/linux/netfilter_bridge.h