kernel_samsung_a53x/net/core
Eric Dumazet db458c02bc net: add more sanity checks to qdisc_pkt_len_init()
[ Upstream commit ab9a9a9e9647392a19e7a885b08000e89c86b535 ]

One path takes care of SKB_GSO_DODGY, assuming
skb->len is bigger than hdr_len.

virtio_net_hdr_to_skb() does not fully dissect TCP headers,
it only make sure it is at least 20 bytes.

It is possible for an user to provide a malicious 'GSO' packet,
total length of 80 bytes.

- 20 bytes of IPv4 header
- 60 bytes TCP header
- a small gso_size like 8

virtio_net_hdr_to_skb() would declare this packet as a normal
GSO packet, because it would see 40 bytes of payload,
bigger than gso_size.

We need to make detect this case to not underflow
qdisc_skb_cb(skb)->pkt_len.

Fixes: 1def9238d4aa ("net_sched: more precise pkt_len computation")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:21:35 +01:00
..
bpf_sk_storage.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
datagram.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
datagram.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dev.c net: add more sanity checks to qdisc_pkt_len_init() 2024-11-23 23:21:35 +01:00
dev_addr_lists.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dev_ioctl.c net: dev: Convert sa_data to flexible array in struct sockaddr 2024-11-18 22:25:41 +01:00
devlink.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drop_monitor.c drop_monitor: replace spin_lock by raw_spin_lock 2024-11-19 14:19:06 +01:00
dst.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dst_cache.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
failover.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fib_notifier.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fib_rules.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
filter.c bpf: Fix a segment issue when downgrading gso_size 2024-11-23 23:20:17 +01:00
flow_dissector.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
flow_offload.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gen_estimator.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gen_stats.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gro_cells.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hwbm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
link_watch.c net: linkwatch: use system_unbound_wq 2024-11-23 23:20:22 +01:00
lwt_bpf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lwtunnel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
neighbour.c neighbour: Don't let neigh_forced_gc() disable preemption for long 2024-11-18 12:12:16 +01:00
net-procfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
net-sysfs.c ethtool: check device is present when getting link settings 2024-11-23 23:20:55 +01:00
net-sysfs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
net-traces.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
net_namespace.c netns: Make get_net_ns() handle zero refcount net 2024-11-19 14:19:08 +01:00
netclassid_cgroup.c bpf, cgroups: Fix cgroup v2 fallback on v1/v2 mixed mode 2024-11-23 23:20:59 +01:00
netevent.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netpoll.c netpoll: Fix race condition in netpoll_owner_active 2024-11-19 14:19:06 +01:00
netprio_cgroup.c bpf, cgroups: Fix cgroup v2 fallback on v1/v2 mixed mode 2024-11-23 23:20:59 +01:00
page_pool.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pktgen.c net: pktgen: Fix interface flags printing 2024-11-08 11:26:11 +01:00
ptp_classifier.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
request_sock.c tcp: make sure init the accept_queue's spinlocks once 2024-11-18 12:12:59 +01:00
rtnetlink.c rtnetlink: Correct nested IFLA_VF_VLAN_LIST attribute validation 2024-11-19 11:32:45 +01:00
scm.c Revert "io_uring/unix: drop usage of io_uring socket" 2024-11-19 09:11:51 +01:00
secure_seq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
skbuff.c kcov: Remove kcov include from sched.h and move it to its users. 2024-11-19 11:32:46 +01:00
skmsg.c bpf, sockmap: Fix sk->sk_forward_alloc warn_on in sk_stream_kill_queues 2024-11-19 14:19:42 +01:00
sock.c ipv6: Fix data races around sk->sk_prot. 2024-11-19 14:19:35 +01:00
sock_destructor.h inet: inet_defrag: prevent sk release while still in use 2024-11-23 23:21:16 +01:00
sock_diag.c sock_diag: annotate data-races around sock_diag_handlers[family] 2024-11-19 08:44:38 +01:00
sock_map.c sock_map: Add a cond_resched() in sock_hash_free() 2024-11-23 23:21:18 +01:00
sock_reuseport.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stream.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sysctl_net_core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timestamping.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tso.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
utils.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xdp.c xdp: fix invalid wait context of page_pool_destroy() 2024-11-23 23:20:08 +01:00