diff options
author | Martin KaFai Lau <kafai@fb.com> | 2018-09-12 10:29:11 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-09-12 22:00:23 +0200 |
commit | 4b1c5d917d34f705096bb7dd8a2bd19b0881970e (patch) | |
tree | f612c951bf03bb81ffa2c8dd393f39781b7fc739 /include | |
parent | cc4dfb7f70a344f24c1c71e298deea0771dadcb2 (diff) |
bpf: btf: Fix end boundary calculation for type section
The end boundary math for type section is incorrect in
btf_check_all_metas(). It just happens that hdr->type_off
is always 0 for now because there are only two sections
(type and string) and string section must be at the end (ensured
in btf_parse_str_sec).
However, type_off may not be 0 if a new section would be added later.
This patch fixes it.
Fixes: f80442a4cd18 ("bpf: btf: Change how section is supported in btf_header")
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions