linux-stable/net/core
Eric Dumazet 9e0d18f946 net: check dev->gso_max_size in gso_features_check()
[ Upstream commit 24ab059d2e ]

Some drivers might misbehave if TSO packets get too big.

GVE for instance uses a 16bit field in its TX descriptor,
and will do bad things if a packet is bigger than 2^16 bytes.

Linux TCP stack honors dev->gso_max_size, but there are
other ways for too big packets to reach an ndo_start_xmit()
handler : virtio_net, af_packet, GRO...

Add a generic check in gso_features_check() and fallback
to GSO when needed.

gso_max_size was added in the blamed commit.

Fixes: 82cc1a7a56 ("[NET]: Add per-connection option to set max TSO frame size")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20231219125331.4127498-1-edumazet@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-05 15:12:25 +01:00
..
bpf_sk_storage.c bpf: Add length check for SK_DIAG_BPF_STORAGE_REQ_MAP_FD parsing 2023-08-11 11:57:47 +02:00
datagram.c net: datagram: fix data-races in datagram_poll() 2023-05-30 12:57:46 +01:00
datagram.h
dev.c net: check dev->gso_max_size in gso_features_check() 2024-01-05 15:12:25 +01:00
dev_addr_lists.c
dev_ioctl.c net: socket: remove register_gifconf 2022-09-28 11:10:35 +02:00
devlink.c devlink: remove reload failed checks in params get/set callbacks 2023-09-23 11:01:05 +02:00
drop_monitor.c drop_monitor: Require 'CAP_SYS_ADMIN' when joining "events" group 2023-12-13 18:27:06 +01:00
dst.c
dst_cache.c wireguard: device: reset peer src endpoint when netns exits 2021-12-08 09:03:22 +01:00
failover.c
fib_notifier.c
fib_rules.c ipv6: fix memory leak in fib6_rule_suppress 2021-12-08 09:03:21 +01:00
filter.c bpf: sockmap, updating the sg structure should also update curr 2023-12-13 18:27:00 +01:00
flow_dissector.c net/ipv6: SKB symmetric hash should incorporate transport ports 2023-09-19 12:20:23 +02:00
flow_offload.c netfilter: nf_tables: bail out early if hardware offload is not supported 2022-06-14 18:32:40 +02:00
gen_estimator.c
gen_stats.c
gro_cells.c net: Fix data-races around netdev_max_backlog. 2022-08-31 17:15:19 +02:00
hwbm.c
link_watch.c
lwt_bpf.c lwt: Fix return values of BPF xmit ops 2023-09-19 12:20:09 +02:00
lwtunnel.c lwtunnel: Validate RTA_ENCAP_TYPE attribute length 2022-01-11 15:25:00 +01:00
Makefile
neighbour.c neighbour: fix various data-races 2023-11-08 17:30:41 +01:00
net-procfs.c net-procfs: show net devices bound packet types 2022-02-01 17:25:44 +01:00
net-sysfs.c net-sysfs: add check for netdevice being present to speed_show 2022-03-16 14:16:00 +01:00
net-sysfs.h
net-traces.c
net_namespace.c net: fix UaF in netns ops registration error path 2023-02-01 08:23:24 +01:00
netclassid_cgroup.c
netevent.c
netpoll.c net: don't let netpoll invoke NAPI if in xmit context 2023-04-20 12:10:21 +02:00
netprio_cgroup.c
page_pool.c
pktgen.c net: pktgen: Fix interface flags printing 2023-10-25 11:54:20 +02:00
ptp_classifier.c
request_sock.c
rtnetlink.c rtnetlink: Reject negative ifindexes in RTM_NEWLINK 2023-08-30 16:23:14 +02:00
scm.c io_uring/af_unix: disable sending io_uring over sockets 2023-12-13 18:27:06 +01:00
secure_seq.c tcp: Fix data-races around sysctl knobs related to SYN option. 2022-07-29 17:19:21 +02:00
skbuff.c skbuff: skb_segment, Call zero copy functions before using skbuff frags 2023-09-19 12:20:20 +02:00
skmsg.c net: fix refcount bug in sk_psock_get (2) 2022-09-05 10:28:56 +02:00
sock.c net: annotate data-races around sk->sk_dst_pending_confirm 2023-11-28 16:54:50 +00:00
sock_diag.c
sock_map.c bpf: sockmap: Remove preempt_disable in sock_map_sk_acquire 2023-08-11 11:57:49 +02:00
sock_reuseport.c udp: Update reuse->has_conns under reuseport_lock. 2022-10-30 09:41:19 +01:00
stream.c net: deal with most data-races in sk_wait_event() 2023-05-30 12:57:46 +01:00
sysctl_net_core.c net: Fix data-races around weight_p and dev_weight_[rt]x_bias. 2022-08-31 17:15:19 +02:00
timestamping.c
tso.c
utils.c
xdp.c