linux/net/batman-adv
Sven Eckelmann b9fd14c208 batman-adv: Fix segfault when writing to throughput_override
The per hardif sysfs file "batman_adv/throughput_override" prints the
resulting change as info text when the users writes to this file. It uses
the helper function batadv_info to add it at the same time to the kernel
ring buffer and to the batman-adv debug log (when CONFIG_BATMAN_ADV_DEBUG
is enabled).

The function batadv_info requires as first parameter the batman-adv softif
net_device. This parameter is then used to find the private buffer which
contains the debug log for this batman-adv interface. But
batadv_store_throughput_override used as first argument the slave
net_device. This slave device doesn't have the batadv_priv private data
which is access by batadv_info.

Writing to this file with CONFIG_BATMAN_ADV_DEBUG enabled can either lead
to a segfault or to memory corruption.

Fixes: 0b5ecc6811 ("batman-adv: add throughput override attribute to hard_ifaces")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Acked-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
2018-09-06 13:54:48 +02:00
..
bat_algo.c batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
bat_algo.h batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
bat_iv_ogm.c batman-adv: Fix bat_ogm_iv best gw refcnt after netlink dump 2018-06-23 10:29:33 +02:00
bat_iv_ogm.h batman-adv: Unify include guards style 2018-07-07 22:02:17 +02:00
bat_v_elp.c batman-adv: Avoid probe ELP information leak 2018-09-06 13:54:47 +02:00
bat_v_elp.h batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
bat_v_ogm.c batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
bat_v_ogm.h batman-adv: Unify include guards style 2018-07-07 22:02:17 +02:00
bat_v.c batman-adv: Fix bat_v best gw refcnt after netlink dump 2018-06-23 10:29:33 +02:00
bat_v.h batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
bitarray.c batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
bitarray.h batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
bridge_loop_avoidance.c net: drivers/net: Convert random_ether_addr to eth_random_addr 2018-06-23 10:49:14 +09:00
bridge_loop_avoidance.h batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
debugfs.c Merge ra.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux 2018-07-20 21:17:12 -07:00
debugfs.h batman-adv: Fix debugfs path for renamed softif 2018-06-23 10:29:33 +02:00
distributed-arp-table.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-03-23 11:31:58 -04:00
distributed-arp-table.h batman-adv: add DAT cache netlink support 2018-03-14 10:15:08 +01:00
fragmentation.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-03-06 01:20:46 -05:00
fragmentation.h batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
gateway_client.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-04-01 19:49:34 -04:00
gateway_client.h batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
gateway_common.c batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
gateway_common.h batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
hard-interface.c batman-adv: Fix debugfs path for renamed softif 2018-06-23 10:29:33 +02:00
hard-interface.h batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
hash.c batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
hash.h batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
icmp_socket.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-03-23 11:31:58 -04:00
icmp_socket.h batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
Kconfig batman-adv: Remove "default n" in Kconfig 2018-06-23 10:30:06 +02:00
log.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-03-23 11:31:58 -04:00
log.h batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
main.c batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
main.h batman-adv: Start new development cycle 2018-04-22 09:29:14 +02:00
Makefile batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
multicast.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-05-26 19:46:15 -04:00
multicast.h batman-adv: add multicast flags netlink support 2018-03-14 10:15:34 +01:00
netlink.c batman-adv: add multicast flags netlink support 2018-03-14 10:15:34 +01:00
netlink.h batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
network-coding.c batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
network-coding.h batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
originator.c batman-adv: Join batadv_purge_orig_ref and _batadv_purge_orig 2018-07-07 22:02:17 +02:00
originator.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-03-06 01:20:46 -05:00
routing.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-03-23 11:31:58 -04:00
routing.h batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
send.c batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
send.h batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
soft-interface.c batman-adv: fix batadv_interface_tx()'s return type 2018-04-25 19:33:36 +02:00
soft-interface.h batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
sysfs.c batman-adv: Fix segfault when writing to throughput_override 2018-09-06 13:54:48 +02:00
sysfs.h batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
tp_meter.c batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
tp_meter.h batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
translation-table.c batman-adv: Fix multicast TT issues with bogus ROAM flags 2018-06-23 10:29:33 +02:00
translation-table.h batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
tvlv.c batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
tvlv.h batman-adv: Update copyright years for 2018 2018-02-26 17:57:39 +01:00
types.h batman-adv: Convert batadv_dat_addr_t to proper type 2018-07-08 12:56:38 +02:00