WSL2-Linux-Kernel/net/batman-adv
Xiyu Yang 6f91a3f7af batman-adv: Fix refcnt leak in batadv_v_ogm_process
batadv_v_ogm_process() invokes batadv_hardif_neigh_get(), which returns
a reference of the neighbor object to "hardif_neigh" with increased
refcount.

When batadv_v_ogm_process() returns, "hardif_neigh" becomes invalid, so
the refcount should be decreased to keep refcount balanced.

The reference counting issue happens in one exception handling paths of
batadv_v_ogm_process(). When batadv_v_ogm_orig_get() fails to get the
orig node and returns NULL, the refcnt increased by
batadv_hardif_neigh_get() is not decreased, causing a refcnt leak.

Fix this issue by jumping to "out" label when batadv_v_ogm_orig_get()
fails to get the orig node.

Fixes: 9323158ef9 ("batman-adv: OGMv2 - implement originators logic")
Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn>
Signed-off-by: Xin Tan <tanxin.ctf@gmail.com>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
2020-04-21 10:08:05 +02:00
..
Kconfig batman-adv: Disable CONFIG_BATMAN_ADV_SYSFS by default 2020-01-01 00:57:07 +01:00
Makefile batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
bat_algo.c batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
bat_algo.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
bat_iv_ogm.c batman-adv: Don't schedule OGM for disabled interface 2020-02-18 09:07:55 +01:00
bat_iv_ogm.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
bat_v.c batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
bat_v.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
bat_v_elp.c batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
bat_v_elp.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
bat_v_ogm.c batman-adv: Fix refcnt leak in batadv_v_ogm_process 2020-04-21 10:08:05 +02:00
bat_v_ogm.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
bitarray.c batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
bitarray.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
bridge_loop_avoidance.c batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
bridge_loop_avoidance.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
debugfs.c batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
debugfs.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
distributed-arp-table.c batman-adv: Replace zero-length array with flexible-array member 2020-02-17 22:43:42 +01:00
distributed-arp-table.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
fragmentation.c batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
fragmentation.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
gateway_client.c batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
gateway_client.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
gateway_common.c batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
gateway_common.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
hard-interface.c batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
hard-interface.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
hash.c batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
hash.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
icmp_socket.c batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
icmp_socket.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
log.c batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
log.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
main.c This feature/cleanup patchset includes the following patches: 2020-01-15 23:04:04 +01:00
main.h batman-adv: Start new development cycle 2020-02-16 16:00:02 +01:00
multicast.c batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
multicast.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
netlink.c batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
netlink.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
network-coding.c batman-adv: fix batadv_nc_random_weight_tq 2020-04-21 10:08:04 +02:00
network-coding.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
originator.c batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
originator.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
routing.c batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
routing.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
send.c batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
send.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
soft-interface.c batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
soft-interface.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
sysfs.c batman-adv: Fix refcnt leak in batadv_store_throughput_override 2020-04-21 10:08:05 +02:00
sysfs.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
tp_meter.c batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
tp_meter.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
trace.c batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
trace.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
translation-table.c batman-adv: Avoid RCU list-traversal in spinlock 2020-02-17 16:07:50 +01:00
translation-table.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
tvlv.c batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
tvlv.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00
types.h batman-adv: Update copyright years for 2020 2020-01-01 00:00:33 +01:00