]> git.baikalelectronics.ru Git - kernel.git/commit
batman-adv: Fix invalid read while copying bat_iv.bcast_own
authorSven Eckelmann <sven@narfation.org>
Sun, 29 Nov 2015 00:48:57 +0000 (01:48 +0100)
committerAntonio Quartulli <a@unstable.cc>
Thu, 7 Jan 2016 06:24:05 +0000 (14:24 +0800)
commit9c378e625861c6c91bea114bf4e7cd295ea76803
treeacd51cfcb64861c0a2e6c67e85eabeab0db36fea
parent485367503d52c093b7ff4592a6f38e4e90168798
batman-adv: Fix invalid read while copying bat_iv.bcast_own

batadv_iv_ogm_orig_del_if removes a part of the bcast_own which previously
belonged to the now removed interface. This is done by copying all data
which comes before the removed interface and then appending all the data
which comes after the removed interface.

The address calculation for the position of the data which comes after the
removed interface assumed that the bat_iv.bcast_own is a pointer to a
single byte datatype. But it is a pointer to unsigned long and thus the
calculated position was wrong off factor sizeof(unsigned long).

Fixes: 83a8342678a0 ("more basic routing code added (forwarding packets /
bitarray added)")

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
net/batman-adv/bat_iv_ogm.c