tmp_suning_uos_patched/net/batman-adv
Sven Eckelmann a6a73781b4 batman-adv: Don't skb_split skbuffs with frag_list
[ Upstream commit a063f2fba3fa633a599253b62561051ac185fa99 ]

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 10:23:42 +02:00
..
bat_algo.c
bat_algo.h
bat_iv_ogm.c batman-adv: Avoid WARN_ON timing related checks 2021-06-23 14:42:41 +02:00
bat_iv_ogm.h
bat_v_elp.c batman-adv: Migrate to linux/prandom.h 2020-08-18 19:39:54 +02:00
bat_v_elp.h
bat_v_ogm.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-04 21:28:59 -07:00
bat_v_ogm.h
bat_v.c
bat_v.h
bitarray.c
bitarray.h
bridge_loop_avoidance.c batman-adv: Check ptr for NULL before reducing its refcnt 2022-04-08 14:40:42 +02:00
bridge_loop_avoidance.h batman-adv: mcast: fix duplicate mcast packets in BLA backbone from mesh 2020-09-15 10:05:24 +02:00
debugfs.c
debugfs.h
distributed-arp-table.c batman-adv: Check ptr for NULL before reducing its refcnt 2022-04-08 14:40:42 +02:00
distributed-arp-table.h
fragmentation.c batman-adv: Don't skb_split skbuffs with frag_list 2022-05-18 10:23:42 +02:00
fragmentation.h
gateway_client.c batman-adv: Check ptr for NULL before reducing its refcnt 2022-04-08 14:40:42 +02:00
gateway_client.h batman-adv: Check ptr for NULL before reducing its refcnt 2022-04-08 14:40:42 +02:00
gateway_common.c
gateway_common.h
hard-interface.c batman-adv: Don't expect inter-netns unique iflink indices 2022-03-08 19:09:33 +01:00
hard-interface.h batman-adv: Check ptr for NULL before reducing its refcnt 2022-04-08 14:40:42 +02:00
hash.c
hash.h
icmp_socket.c
icmp_socket.h
Kconfig
log.c batman-adv: set .owner to THIS_MODULE 2020-11-15 11:43:56 +01:00
log.h batman-adv: Fix typos and grammar in documentation 2020-06-26 10:36:30 +02:00
main.c net: batman-adv: fix error handling 2021-11-02 19:48:22 +01:00
main.h batman-adv: Start new development cycle 2020-08-18 19:39:53 +02:00
Makefile
multicast.c ipv6: make mc_forwarding atomic 2022-04-13 21:00:56 +02:00
multicast.h batman-adv: mcast: don't send link-local multicast to mcast routers 2022-01-11 15:25:00 +01:00
netlink.c batman-adv: allow netlink usage in unprivileged containers 2022-01-27 10:54:11 +01:00
netlink.h
network-coding.c batman-adv: Check ptr for NULL before reducing its refcnt 2022-04-08 14:40:42 +02:00
network-coding.h
originator.c batman-adv: Check ptr for NULL before reducing its refcnt 2022-04-08 14:40:42 +02:00
originator.h batman-adv: Check ptr for NULL before reducing its refcnt 2022-04-08 14:40:42 +02:00
routing.c batman-adv: mcast/TT: fix wrongly dropped or rerouted packets 2020-09-05 08:45:46 +02:00
routing.h
send.c batman-adv: Drop repeated words in comments 2020-08-18 19:39:54 +02:00
send.h
soft-interface.c batman-adv: Check ptr for NULL before reducing its refcnt 2022-04-08 14:40:42 +02:00
soft-interface.h batman-adv: Check ptr for NULL before reducing its refcnt 2022-04-08 14:40:42 +02:00
sysfs.c
sysfs.h
tp_meter.c batman-adv: Check ptr for NULL before reducing its refcnt 2022-04-08 14:40:42 +02:00
tp_meter.h
trace.c
trace.h
translation-table.c batman-adv: Check ptr for NULL before reducing its refcnt 2022-04-08 14:40:42 +02:00
translation-table.h batman-adv: Check ptr for NULL before reducing its refcnt 2022-04-08 14:40:42 +02:00
tvlv.c batman-adv: Check ptr for NULL before reducing its refcnt 2022-04-08 14:40:42 +02:00
tvlv.h
types.h batman-adv: types.h: delete duplicated words 2020-08-18 19:39:53 +02:00