netfilter: bridge: stp fix reference to uninitialized data
authorStephen Hemminger <stephen@networkplumber.org>
Fri, 27 Apr 2018 18:16:09 +0000 (11:16 -0700)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 8 May 2018 12:08:12 +0000 (14:08 +0200)
commita4995684a949cc1d28fbf09900c47c34b9427ecf
tree39e08cb32dee46af6f9ea62ef32d4323e98d8ebc
parent2f99aa31cd7a5d667f17dd2924c884c3d2c621ac
netfilter: bridge: stp fix reference to uninitialized data

The destination mac (destmac) is only valid if EBT_DESTMAC flag
is set. Fix by changing the order of the comparison to look for
the flag first.

Reported-by: syzbot+5c06e318fc558cc27823@syzkaller.appspotmail.com
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/bridge/netfilter/ebt_stp.c