linux-stable/net/batman-adv
Sven Eckelmann 5ed837a7e0 batman-adv: Don't skb_split skbuffs with frag_list
[ Upstream commit a063f2fba3 ]

The receiving interface might have used GRO to receive more fragments than
MAX_SKB_FRAGS fragments. In this case, these will not be stored in
skb_shinfo(skb)->frags but merged into the frag list.

batman-adv relies on the function skb_split to split packets up into
multiple smaller packets which are not larger than the MTU on the outgoing
interface. But this function cannot handle frag_list entries and is only
operating on skb_shinfo(skb)->frags. If it is still trying to split such an
skb and xmit'ing it on an interface without support for NETIF_F_FRAGLIST,
then validate_xmit_skb() will try to linearize it. But this fails due to
inconsistent information. And __pskb_pull_tail will trigger a BUG_ON after
skb_copy_bits() returns an error.

In case of entries in frag_list, just linearize the skb before operating on
it with skb_split().

Reported-by: Felix Kaechele <felix@kaechele.ca>
Fixes: c6c8fea297 ("net: Add batman-adv meshing protocol")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Tested-by: Felix Kaechele <felix@kaechele.ca>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-18 09:18:05 +02:00
..
bat_algo.c
bat_algo.h
bat_iv_ogm.c batman-adv: Avoid WARN_ON timing related checks 2021-06-30 08:48:48 -04:00
bat_iv_ogm.h
bat_v.c batman-adv: Fix check of retrieved orig_gw in batadv_v_gw_is_eligible 2020-03-20 10:54:21 +01:00
bat_v.h
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
bat_v_ogm.c batman-adv: Fix own OGM check in aggregated OGMs 2020-09-09 19:03:07 +02:00
bat_v_ogm.h
bitarray.c
bitarray.h
bridge_loop_avoidance.c batman-adv: mcast: fix duplicate mcast packets from BLA backbone to mesh 2021-11-26 11:40:41 +01:00
bridge_loop_avoidance.h batman-adv: mcast: fix duplicate mcast packets in BLA backbone from mesh 2020-10-01 13:12:51 +02:00
debugfs.c batman-adv: Fix debugfs path for renamed softif 2020-03-20 10:54:22 +01:00
debugfs.h batman-adv: Fix debugfs path for renamed softif 2020-03-20 10:54:22 +01:00
distributed-arp-table.c batman-adv: Fix DAT candidate selection on little endian systems 2020-01-23 08:20:34 +01:00
distributed-arp-table.h
fragmentation.c batman-adv: Don't skb_split skbuffs with frag_list 2022-05-18 09:18:05 +02:00
fragmentation.h
gateway_client.c batman-adv: Avoid uninitialized chaddr when handling DHCP 2020-09-09 19:03:07 +02:00
gateway_client.h
gateway_common.c
gateway_common.h
hard-interface.c batman-adv: Don't expect inter-netns unique iflink indices 2022-03-08 19:01:57 +01:00
hard-interface.h
hash.c
hash.h
icmp_socket.c networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
icmp_socket.h
Kconfig
log.c batman-adv: set .owner to THIS_MODULE 2020-12-02 08:34:42 +01:00
log.h
main.c net: batman-adv: fix error handling 2021-11-02 18:25:12 +01:00
main.h batman-adv: Start new development cycle 2017-07-29 09:51:25 +02:00
Makefile
multicast.c batman-adv: mcast: fix duplicate mcast packets in BLA backbone from LAN 2021-11-26 11:40:41 +01:00
multicast.h batman-adv: mcast: fix duplicate mcast packets in BLA backbone from LAN 2021-11-26 11:40:41 +01:00
netlink.c batman-adv: fix uninit-value in batadv_netlink_get_ifindex() 2019-09-16 08:20:45 +02:00
netlink.h
network-coding.c net: batman-adv: fix error handling 2021-11-02 18:25:12 +01:00
network-coding.h
originator.c batman-adv: Fix internal interface indices types 2020-03-20 10:54:21 +01:00
originator.h batman-adv: Fix internal interface indices types 2020-03-20 10:54:21 +01:00
packet.h
routing.c batman-adv: mcast/TT: fix wrongly dropped or rerouted packets 2020-10-01 13:12:50 +02:00
routing.h
send.c batman-adv: fix various spelling mistakes 2017-07-29 09:51:28 +02:00
send.h
soft-interface.c batman-adv: mcast: fix duplicate mcast packets in BLA backbone from LAN 2021-11-26 11:40:41 +01:00
soft-interface.h
sysfs.c batman-adv: Fix refcnt leak in batadv_store_throughput_override 2020-05-20 08:16:59 +02:00
sysfs.h
tp_meter.c networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
tp_meter.h
translation-table.c net: batman-adv: fix error handling 2021-11-02 18:25:12 +01:00
translation-table.h
tvlv.c batman-adv: Prevent duplicated tvlv handler 2018-10-20 09:48:49 +02:00
tvlv.h
types.h batman-adv: Avoid free/alloc race when handling OGM buffer 2020-03-20 10:54:22 +01:00