acrn-kernel/net/core
Jakub Kicinski 321635c703 bpf: pull before calling skb_postpull_rcsum()
[ Upstream commit 54c3f1a814 ]

Anand hit a BUG() when pulling off headers on egress to a SW tunnel.
We get to skb_checksum_help() with an invalid checksum offset
(commit d7ea0d9df2 ("net: remove two BUG() from skb_checksum_help()")
converted those BUGs to WARN_ONs()).
He points out oddness in how skb_postpull_rcsum() gets used.
Indeed looks like we should pull before "postpull", otherwise
the CHECKSUM_PARTIAL fixup from skb_postpull_rcsum() will not
be able to do its job:

	if (skb->ip_summed == CHECKSUM_PARTIAL &&
	    skb_checksum_start_offset(skb) < 0)
		skb->ip_summed = CHECKSUM_NONE;

Reported-by: Anand Parthasarathy <anpartha@meta.com>
Fixes: 6578171a7f ("bpf: add bpf_skb_change_proto helper")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Stanislav Fomichev <sdf@google.com>
Link: https://lore.kernel.org/r/20221220004701.402165-1-kuba@kernel.org
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-12 12:01:57 +01:00
..
Makefile
bpf_sk_storage.c
datagram.c
dev.c net: add atomic_long_t to net_device_stats fields 2022-12-31 13:33:02 +01:00
dev.h
dev_addr_lists.c
dev_addr_lists_test.c
dev_ioctl.c
devlink.c devlink: protect devlink dump by the instance lock 2022-12-31 13:32:55 +01:00
drop_monitor.c
dst.c
dst_cache.c
failover.c
fib_notifier.c
fib_rules.c
filter.c bpf: pull before calling skb_postpull_rcsum() 2023-01-12 12:01:57 +01:00
flow_dissector.c netfilter: conntrack: Fix data-races around ct mark 2022-11-18 15:21:00 +01:00
flow_offload.c
gen_estimator.c
gen_stats.c
gro.c
gro_cells.c
hwbm.c
link_watch.c
lwt_bpf.c
lwtunnel.c xfrm: lwtunnel: squelch kernel warning in case XFRM encap type is not available 2022-10-12 10:45:51 +02:00
neighbour.c net: neigh: decrement the family specific qlen 2022-11-18 10:29:50 +00:00
net-procfs.c
net-sysfs.c
net-sysfs.h
net-traces.c
net_namespace.c net: fix UAF issue in nfqnl_nf_hook_drop() when ops_init() failed 2022-10-24 12:40:06 +01:00
netclassid_cgroup.c
netevent.c
netpoll.c
netprio_cgroup.c
of_net.c
page_pool.c
pktgen.c treewide: use get_random_u32() when possible 2022-10-11 17:42:58 -06:00
ptp_classifier.c
request_sock.c
rtnetlink.c
scm.c
secure_seq.c
selftests.c
skbuff.c skbuff: Account for tail adjustment during pull operations 2022-12-31 13:32:55 +01:00
skmsg.c bpf, sockmap: Fix missing BPF_F_INGRESS flag when using apply_bytes 2022-12-31 13:32:20 +01:00
sock.c soreuseport: Fix socket selection for SO_INCOMING_CPU. 2022-12-31 13:32:04 +01:00
sock_destructor.h
sock_diag.c
sock_map.c bpf, sockmap: fix race in sock_map_free() 2022-12-31 13:32:22 +01:00
sock_reuseport.c soreuseport: Fix socket selection for SO_INCOMING_CPU. 2022-12-31 13:32:04 +01:00
stream.c net: stream: purge sk_error_queue in sk_stream_kill_queues() 2022-12-31 13:32:56 +01:00
sysctl_net_core.c
timestamping.c
tso.c
utils.c
xdp.c