diff options
author | 2021-11-03 10:32:11 -0700 | |
---|---|---|
committer | 2021-11-03 13:25:37 -0700 | |
commit | 62554d52e71797eefa3fc15b54008038837bb2d4 (patch) | |
tree | bca9ea3dbbbc86ca5a738ed497a31dbc0b32871e /tools/testing/selftests/bpf/prog_tests | |
parent | libbpf: Improve sanity checking during BTF fix up (diff) | |
download | linux-dev-62554d52e71797eefa3fc15b54008038837bb2d4.tar.xz linux-dev-62554d52e71797eefa3fc15b54008038837bb2d4.zip |
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')
0 files changed, 0 insertions, 0 deletions