platform_kernel-5.15/tools
Kumar Kartikeya Dwivedi ccf74d1eca UPSTREAM: selftests/bpf: Add test for reg2btf_ids out of bounds access
commit 13c6a37d409db9abc9c0bfc6d0a2f07bf0fff60e upstream.

This test tries to pass a PTR_TO_BTF_ID_OR_NULL to the release function,
which would trigger a out of bounds access without the fix in commit
45ce4b4f9009 ("bpf: Fix crash due to out of bounds access into reg2btf_ids.")
but after the fix, it should only index using base_type(reg->type),
which should be less than __BPF_REG_TYPE_MAX, and also not permit any
type flags to be set for the reg->type.

Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20220220023138.2224652-1-memxor@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit f59e6886ca)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia75c39dc8b826f7e55c326eeb906e2dd9f353ab9
2022-06-18 18:28:45 +00:00
..
accounting
arch tools arch: Update arch/x86/lib/mem{cpy,set}_64.S copies used in 'perf bench mem memcpy' 2022-05-15 20:18:51 +02:00
bootconfig tools/bootconfig: Define memblock_free_ptr() to fix build error 2021-09-15 09:49:48 -07:00
bpf Merge 5.15.33 into android13-5.15 2022-04-20 08:18:54 +02:00
build tools build: Use $(shell ) instead of `` to get embedded libperl's ccopts 2022-04-13 20:59:26 +02:00
cgroup
crypto ANDROID: fips140: add kernel crypto module 2022-03-15 21:24:22 +00:00
debugging
edid
firewire
firmware
gpio
hv
iio
include Merge 5.15.33 into android13-5.15 2022-04-20 08:18:54 +02:00
io_uring tools/io_uring/io_uring-cp: sync with liburing example 2021-08-13 08:58:11 -06:00
kvm/kvm_stat KVM: kvm_stat: do not show halt_wait_ns 2021-10-18 14:07:18 -04:00
laptop
leds
lib perf tools: Fix segfault accessing sample_id xyarray 2022-04-27 14:38:50 +02:00
memory-model tools/memory-model: Document data_race(READ_ONCE()) 2021-07-27 11:48:55 -07:00
objtool objtool: Fix SLS validation for kcov tail-call replacement 2022-05-15 20:18:51 +02:00
pci tools: PCI: Zero-initialize param 2021-08-05 11:01:30 +01:00
pcmcia
perf perf symbol: Remove arch__symbols__fixup_end() 2022-05-09 09:14:44 +02:00
power
rcu
scripts
spi
testing UPSTREAM: selftests/bpf: Add test for reg2btf_ids out of bounds access 2022-06-18 18:28:45 +00:00
thermal/tmon tools/thermal/tmon: Add cross compiling support 2021-08-14 15:33:19 +02:00
time
tracing tools/latency-collector: Use correct size when writing queue_full_warning 2021-11-18 19:16:19 +01:00
usb usb: testusb: Fix for showing the connection speed 2021-09-14 10:31:41 +02:00
virtio tools/virtio: fix virtio_test execution 2022-04-08 14:22:47 +02:00
vm tools/vm/page-types: remove dependency on opt_file for idle page tracking 2021-09-24 16:13:35 -07:00
wmi
Makefile