linux/net/batman-adv
Sven Eckelmann f7af86ccf1 batman-adv: Fix deletion of RTR(4|6) mcast list entries
The multicast code uses the lists bat_priv->mcast.want_all_rtr*_list to
store all all originator nodes which don't have the flag no-RTR4 or no-RTR6
set. When an originator is purged, it has to be removed from these lists.

Since all entries without the BATADV_MCAST_WANT_NO_RTR4/6 are stored in
these lists, they have to be handled like entries which have these flags
set to force the update routines to remove them from the lists when purging
the originator.

Not doing so will leave a pointer to a freed memory region inside the list.
Trying to operate on these lists will then cause an use-after-free error:

  BUG: KASAN: use-after-free in batadv_mcast_want_rtr4_update+0x335/0x3a0 [batman_adv]
  Write of size 8 at addr ffff888007b41a38 by task swapper/0/0

Fixes: 61caf3d109 ("batman-adv: mcast: detect, distribute and maintain multicast router presence")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Acked-by: Linus Lüssing <linus.luessing@c0d3.blue>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
2019-07-22 21:34:58 +02:00
..
bat_algo.c
bat_algo.h batman-adv: Use includes instead of fwdecls 2019-05-25 12:59:53 +02:00
bat_iv_ogm.c batman-adv: Fix duplicated OGMs on NETDEV_UP 2019-06-02 13:33:48 +02:00
bat_iv_ogm.h
bat_v_elp.c
bat_v_elp.h batman-adv: Use includes instead of fwdecls 2019-05-25 12:59:53 +02:00
bat_v_ogm.c
bat_v_ogm.h batman-adv: Use includes instead of fwdecls 2019-05-25 12:59:53 +02:00
bat_v.c batman-adv: Use includes instead of fwdecls 2019-05-25 12:59:53 +02:00
bat_v.h
bitarray.c
bitarray.h
bridge_loop_avoidance.c
bridge_loop_avoidance.h batman-adv: Use includes instead of fwdecls 2019-05-25 12:59:53 +02:00
debugfs.c batman-adv: no need to check return value of debugfs_create functions 2019-06-27 19:25:04 +02:00
debugfs.h batman-adv: no need to check return value of debugfs_create functions 2019-06-27 19:25:04 +02:00
distributed-arp-table.c
distributed-arp-table.h batman-adv: Use includes instead of fwdecls 2019-05-25 12:59:53 +02:00
fragmentation.c
fragmentation.h batman-adv: Use includes instead of fwdecls 2019-05-25 12:59:53 +02:00
gateway_client.c
gateway_client.h batman-adv: Use includes instead of fwdecls 2019-05-25 12:59:53 +02:00
gateway_common.c
gateway_common.h batman-adv: Use includes instead of fwdecls 2019-05-25 12:59:53 +02:00
hard-interface.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-07-08 19:48:57 -07:00
hard-interface.h batman-adv: Use includes instead of fwdecls 2019-05-25 12:59:53 +02:00
hash.c
hash.h batman-adv: Use includes instead of fwdecls 2019-05-25 12:59:53 +02:00
icmp_socket.c batman-adv: no need to check return value of debugfs_create functions 2019-06-27 19:25:04 +02:00
icmp_socket.h batman-adv: no need to check return value of debugfs_create functions 2019-06-27 19:25:04 +02:00
Kconfig
log.c batman-adv: no need to check return value of debugfs_create functions 2019-06-27 19:25:04 +02:00
log.h batman-adv: Add missing include for atomic functions 2019-05-25 12:59:53 +02:00
main.c
main.h batman-adv: Use includes instead of fwdecls 2019-05-25 12:59:53 +02:00
Makefile
multicast.c batman-adv: Fix deletion of RTR(4|6) mcast list entries 2019-07-22 21:34:58 +02:00
multicast.h batman-adv: Use includes instead of fwdecls 2019-05-25 12:59:53 +02:00
netlink.c batman-adv: Use includes instead of fwdecls 2019-05-25 12:59:53 +02:00
netlink.h batman-adv: Use includes instead of fwdecls 2019-05-25 12:59:53 +02:00
network-coding.c batman-adv: no need to check return value of debugfs_create functions 2019-06-27 19:25:04 +02:00
network-coding.h batman-adv: no need to check return value of debugfs_create functions 2019-06-27 19:25:04 +02:00
originator.c batman-adv: mcast: detect, distribute and maintain multicast router presence 2019-06-27 19:25:05 +02:00
originator.h batman-adv: Use includes instead of fwdecls 2019-05-25 12:59:53 +02:00
routing.c
routing.h batman-adv: Use includes instead of fwdecls 2019-05-25 12:59:53 +02:00
send.c
send.h batman-adv: Use includes instead of fwdecls 2019-05-25 12:59:53 +02:00
soft-interface.c batman-adv: mcast: shorten multicast tt/tvlv worker spinlock section 2019-05-25 12:59:54 +02:00
soft-interface.h batman-adv: Use includes instead of fwdecls 2019-05-25 12:59:53 +02:00
sysfs.c
sysfs.h batman-adv: Use includes instead of fwdecls 2019-05-25 12:59:53 +02:00
tp_meter.c
tp_meter.h batman-adv: Use includes instead of fwdecls 2019-05-25 12:59:53 +02:00
trace.c
trace.h
translation-table.c
translation-table.h batman-adv: Use includes instead of fwdecls 2019-05-25 12:59:53 +02:00
tvlv.c
tvlv.h batman-adv: Use includes instead of fwdecls 2019-05-25 12:59:53 +02:00
types.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-07-08 19:48:57 -07:00