diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2021-11-03 10:32:11 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2021-11-03 13:25:37 -0700 |
commit | 62554d52e71797eefa3fc15b54008038837bb2d4 (patch) | |
tree | bca9ea3dbbbc86ca5a738ed497a31dbc0b32871e /tools/testing/selftests/bpf/prog_tests/exhandler.c | |
parent | 88918dc12dc357a06d8d722a684617b1c87a4654 (diff) |
libbpf: Validate that .BTF and .BTF.ext sections contain data
.BTF and .BTF.ext ELF sections should have SHT_PROGBITS type and contain
data. If they are not, ELF is invalid or corrupted, so bail out.
Otherwise this can lead to data->d_buf being NULL and SIGSEGV later on.
Reported by oss-fuzz project.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20211103173213.1376990-4-andrii@kernel.org
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/exhandler.c')
0 files changed, 0 insertions, 0 deletions