linux/net/batman-adv
Sven Eckelmann 0ee47efddd batman-adv: Force mac header to start of data on xmit
commit 9114daa825 upstream.

The caller of ndo_start_xmit may not already have called
skb_reset_mac_header. The returned value of skb_mac_header/eth_hdr
therefore can be in the wrong position and even outside the current skbuff.
This for example happens when the user binds to the device using a
PF_PACKET-SOCK_RAW with enabled qdisc-bypass:

  int opt = 4;
  setsockopt(sock, SOL_PACKET, PACKET_QDISC_BYPASS, &opt, sizeof(opt));

Since eth_hdr is used all over the codebase, the batadv_interface_tx
function must always take care of resetting it.

Fixes: c6c8fea297 ("net: Add batman-adv meshing protocol")
Reported-by: syzbot+9d7405c7faa390e60b4e@syzkaller.appspotmail.com
Reported-by: syzbot+7d20bc3f1ddddc0f9079@syzkaller.appspotmail.com
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>
2019-02-15 08:09:13 +01:00
..
bat_algo.c batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
bat_algo.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
bat_iv_ogm.c batman-adv: Fix bat_ogm_iv best gw refcnt after netlink dump 2018-08-24 13:09:05 +02:00
bat_iv_ogm.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
bat_v_elp.c batman-adv: Use explicit tvlv padding for ELP packets 2018-12-13 09:18:46 +01:00
bat_v_elp.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
bat_v_ogm.c batman-adv: fix various spelling mistakes 2017-07-29 09:51:28 +02:00
bat_v_ogm.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
bat_v.c batman-adv: Fix bat_v best gw refcnt after netlink dump 2018-08-24 13:09:05 +02:00
bat_v.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
bitarray.c batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
bitarray.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
bridge_loop_avoidance.c batman-adv: fix backbone_gw refcount on queue_work() failure 2018-10-20 09:48:49 +02:00
bridge_loop_avoidance.h batman-adv: prevent multiple ARP replies sent by gateways if dat enabled 2017-03-22 10:30:53 +01:00
debugfs.c batman-adv: Fix includes for IS_ERR/ERR_PTR 2017-01-28 10:40:35 +01:00
debugfs.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
distributed-arp-table.c batman-adv: fix header size check in batadv_dbg_arp() 2018-05-30 07:52:16 +02:00
distributed-arp-table.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
fragmentation.c batman-adv: Expand merged fragment buffer for full packet 2018-12-13 09:18:46 +01:00
fragmentation.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
gateway_client.c batman-adv: Prevent duplicated gateway_node entry 2018-10-20 09:48:48 +02:00
gateway_client.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
gateway_common.c Here are two batman-adv bugfixes: 2017-03-16 12:05:38 -07:00
gateway_common.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
hard-interface.c batman-adv: Avoid WARN on net_device without parent in netns 2019-02-15 08:09:13 +01:00
hard-interface.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
hash.c batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
hash.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
icmp_socket.c networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
icmp_socket.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
Kconfig batman-adv: Allow selecting BATMAN V if CFG80211 is not built 2016-10-17 16:28:48 +02:00
log.c batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
log.h batman-adv: Fix possible side-effects in _batadv_dbg 2017-03-16 21:14:52 +01:00
main.c batman-adv: restructure rebroadcast counter into forw_packet API 2017-03-26 12:46:44 +02:00
main.h batman-adv: Start new development cycle 2017-07-29 09:51:25 +02:00
Makefile batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
multicast.c batman-adv: fix multicast-via-unicast transmission with AP isolation 2018-05-30 07:52:19 +02:00
multicast.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
netlink.c batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
netlink.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
network-coding.c batman-adv: Prevent duplicated nc_node entry 2018-10-20 09:48:48 +02:00
network-coding.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
originator.c batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
originator.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
packet.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
routing.c batman-adv: Fix skbuff rcsum on packet reroute 2018-05-30 07:52:16 +02:00
routing.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
send.c batman-adv: fix various spelling mistakes 2017-07-29 09:51:28 +02:00
send.h batman-adv: restructure rebroadcast counter into forw_packet API 2017-03-26 12:46:44 +02:00
soft-interface.c batman-adv: Force mac header to start of data on xmit 2019-02-15 08:09:13 +01:00
soft-interface.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
sysfs.c batman-adv: Fix segfault when writing to sysfs elp_interval 2018-10-20 09:48:48 +02:00
sysfs.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
tp_meter.c networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
tp_meter.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
translation-table.c batman-adv: Prevent duplicated global TT entry 2018-10-20 09:48:49 +02:00
translation-table.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
tvlv.c batman-adv: Prevent duplicated tvlv handler 2018-10-20 09:48:49 +02:00
tvlv.h batman-adv: update copyright years for 2017 2017-01-26 08:34:19 +01:00
types.h batman-adv: fix TT sync flag inconsistencies 2017-07-31 11:17:38 +02:00