]> git.itanic.dy.fi Git - linux-stable/commit
batman-adv: Check skb size before using encapsulated ETH+VLAN header
authorSven Eckelmann <sven@narfation.org>
Fri, 26 Feb 2016 16:56:13 +0000 (17:56 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 15 Jun 2016 20:28:12 +0000 (21:28 +0100)
commit983edac6e3cfc2926812713b43408826ab88af95
treec309656f293c1e62af792745fa52f380913e9c7a
parent2ecc8cfb833a45c8df005209fbd6e0382cf3c0b1
batman-adv: Check skb size before using encapsulated ETH+VLAN header

commit c78296665c3d81f040117432ab9e1cb125521b0c upstream.

The encapsulated ethernet and VLAN header may be outside the received
ethernet frame. Thus the skb buffer size has to be checked before it can be
parsed to find out if it encapsulates another batman-adv packet.

Fixes: 420193573f11 ("batman-adv: softif bridge loop avoidance")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/batman-adv/soft-interface.c