diff options
| author | Kumar Kartikeya Dwivedi <[email protected]> | 2022-02-20 02:31:38 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2022-02-22 04:24:15 +0000 |
| commit | 13c6a37d409db9abc9c0bfc6d0a2f07bf0fff60e (patch) | |
| tree | 1ecdbf04a10f3a3f6ebf32f59871c79ccf2ded1a /tools/bpf/bpftool/prog.c | |
| parent | selftests/bpf: Fix btfgen tests (diff) | |
| download | kernel-13c6a37d409db9abc9c0bfc6d0a2f07bf0fff60e.tar.gz kernel-13c6a37d409db9abc9c0bfc6d0a2f07bf0fff60e.zip | |
selftests/bpf: Add test for reg2btf_ids out of bounds access
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 <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/bpf/bpftool/prog.c')
0 files changed, 0 insertions, 0 deletions
