linux-stable/net/batman-adv
Sven Eckelmann 8562759c8f batman-adv: Avoid free/alloc race when handling OGM2 buffer
commit a8d23cbbf6 upstream.

A B.A.T.M.A.N. V virtual interface has an OGM2 packet buffer which is
initialized using data from the netdevice notifier and other rtnetlink
related hooks. It is sent regularly via various slave interfaces of the
batadv virtual interface and in this process also modified (realloced) to
integrate additional state information via TVLV containers.

It must be avoided that the worker item is executed without a common lock
with the netdevice notifier/rtnetlink helpers. Otherwise it can either
happen that half modified data is sent out or the functions modifying the
OGM2 buffer try to access already freed memory regions.

Fixes: 0da0035942 ("batman-adv: OGMv2 - add basic infrastructure")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-18 07:14:25 +01:00
..
bat_algo.c
bat_algo.h
bat_iv_ogm.c batman-adv: Don't schedule OGM for disabled interface 2020-03-18 07:14:22 +01:00
bat_iv_ogm.h
bat_v.c
bat_v.h
bat_v_elp.c batman-adv: fix warning in function batadv_v_elp_get_throughput 2019-05-08 07:21:46 +02:00
bat_v_elp.h
bat_v_ogm.c batman-adv: Avoid free/alloc race when handling OGM2 buffer 2020-03-18 07:14:25 +01:00
bat_v_ogm.h
bitarray.c
bitarray.h
bridge_loop_avoidance.c
bridge_loop_avoidance.h
debugfs.c
debugfs.h
distributed-arp-table.c batman-adv: Fix DAT candidate selection on little endian systems 2020-01-23 08:21:34 +01:00
distributed-arp-table.h
fragmentation.c
fragmentation.h
gateway_client.c
gateway_client.h
gateway_common.c
gateway_common.h
hard-interface.c batman-adv: Avoid free/alloc race when handling OGM buffer 2019-11-06 13:06:22 +01:00
hard-interface.h
hash.c
hash.h
icmp_socket.c
icmp_socket.h
Kconfig
log.c
log.h
main.c batman-adv: mcast: fix multicast tt/tvlv worker locking 2019-05-31 06:46:05 -07:00
main.h
Makefile
multicast.c batman-adv: mcast: fix multicast tt/tvlv worker locking 2019-05-31 06:46:05 -07:00
multicast.h
netlink.c batman-adv: fix uninit-value in batadv_netlink_get_ifindex() 2019-09-16 08:21:41 +02:00
netlink.h
network-coding.c
network-coding.h
originator.c
originator.h
routing.c
routing.h
send.c
send.h
soft-interface.c
soft-interface.h
sysfs.c
sysfs.h
tp_meter.c
tp_meter.h
translation-table.c batman-adv: fix for leaked TVLV handler. 2019-07-26 09:13:59 +02:00
translation-table.h
tvlv.c
tvlv.h
types.h batman-adv: Avoid free/alloc race when handling OGM2 buffer 2020-03-18 07:14:25 +01:00