linux-stable/net/core
Joanne Koong d249081b51 bpf: Fix bpf_xdp_pointer return pointer
[ Upstream commit bbd52178e2 ]

For the case where offset + len == size, bpf_xdp_pointer should return a
valid pointer to the addr because that access is permitted. We should
only return NULL in the case where offset + len exceeds size.

Fixes: 3f364222d0 ("net: xdp: introduce bpf_xdp_pointer utility routine")
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/bpf/20220722220105.2065466-1-joannelkoong@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-08-17 14:41:11 +02:00
..
Makefile
bpf_sk_storage.c bpf: Fix usage of trace RCU in local storage. 2022-06-06 08:48:59 +02:00
datagram.c net: remove noblock parameter from skb_recv_datagram() 2022-06-22 14:28:02 +02:00
datagram.h
dev.c net: fix data-race in dev_isalive() 2022-06-29 09:04:30 +02:00
dev_addr_lists.c
dev_addr_lists_test.c
dev_ioctl.c
devlink.c devlink: hold the instance lock during eswitch_mode callbacks 2022-03-21 14:11:38 +00:00
drop_monitor.c
dst.c
dst_cache.c
failover.c
fib_notifier.c
fib_rules.c
filter.c bpf: Fix bpf_xdp_pointer return pointer 2022-08-17 14:41:11 +02:00
flow_dissector.c flow_dissector: fix false-positive __read_overflow2_field() warning 2022-04-08 12:16:59 +01:00
flow_offload.c netfilter: nf_tables: bail out early if hardware offload is not supported 2022-06-14 18:45:05 +02:00
gen_estimator.c
gen_stats.c
gro.c
gro_cells.c
hwbm.c
link_watch.c
lwt_bpf.c bpf, lwt: Fix crash when using bpf_skb_set_tunnel_key() from bpf_xmit lwt hook 2022-04-22 17:45:25 +02:00
lwtunnel.c
neighbour.c net, neigh: Set lower cap for neigh_managed_work rearming 2022-06-14 18:45:12 +02:00
net-procfs.c
net-sysfs.c net: fix data-race in dev_isalive() 2022-06-29 09:04:30 +02:00
net-sysfs.h
net-traces.c
net_namespace.c
netclassid_cgroup.c
netevent.c
netpoll.c
netprio_cgroup.c
of_net.c
page_pool.c
pktgen.c
ptp_classifier.c
request_sock.c
rtnetlink.c rtnetlink: Fix handling of disabled L3 stats in RTM_GETSTATS replies 2022-04-14 09:01:26 +02:00
scm.c
secure_seq.c tcp: Fix data-races around sysctl knobs related to SYN option. 2022-07-29 17:28:11 +02:00
selftests.c
skbuff.c net: fix wrong network header length 2022-05-09 10:48:49 +01:00
skmsg.c skmsg: Fix invalid last sg check in sk_msg_recvmsg() 2022-08-17 14:41:04 +02:00
sock.c
sock_destructor.h
sock_diag.c
sock_map.c
sock_reuseport.c tcp: Fix data-races around sysctl_tcp_migrate_req. 2022-07-29 17:28:05 +02:00
stream.c
sysctl_net_core.c
timestamping.c
tso.c
utils.c
xdp.c Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2022-03-22 11:18:49 -07:00