diff options
| author | Sven Eckelmann <sven@narfation.org> | 2020-03-18 00:27:00 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-03-20 09:06:26 +0100 |
| commit | 39bd75b20ee158642e4c65751aaa45e2210bf15c (patch) | |
| tree | 1e1d750cb9b7c389ab5e1a163df89e4f66e675eb /net/batman-adv/soft-interface.c | |
| parent | e82b225aa8e02e8a2baea0643bebfe7e781696df (diff) | |
batman-adv: Fix ICMP RR ethernet access after skb_linearize
commit 3b55e4422087f9f7b241031d758a0c65584e4297 upstream.
The skb_linearize may reallocate the skb. This makes the calculated pointer
for ethhdr invalid. But it the pointer is used later to fill in the RR
field of the batadv_icmp_packet_rr packet.
Instead re-evaluate eth_hdr after the skb_linearize+skb_cow to fix the
pointer and avoid the invalid read.
Fixes: da6b8c20a5b8 ("batman-adv: generalize batman-adv icmp packet handling")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/batman-adv/soft-interface.c')
0 files changed, 0 insertions, 0 deletions
