Skip to content

libbpf: avoid overflow in BTF.ext bounds check - #8694

Open
kernel-patches-daemon-bpf-rc[bot] wants to merge 1 commit into
bpf-next_basefrom
series/1143700=>bpf-next
Open

libbpf: avoid overflow in BTF.ext bounds check#8694
kernel-patches-daemon-bpf-rc[bot] wants to merge 1 commit into
bpf-next_basefrom
series/1143700=>bpf-next

Conversation

@kernel-patches-daemon-bpf-rc

Copy link
Copy Markdown

Pull request for series with
subject: libbpf: avoid overflow in BTF.ext bounds check
version: 5
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1143700

@kernel-patches-daemon-bpf-rc

Copy link
Copy Markdown
Author

Upstream branch: d114bb9
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1143700
version: 5

@kernel-patches-daemon-bpf-rc

Copy link
Copy Markdown
Author

Upstream branch: 07cb86a
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1143700
version: 5

An invalid BTF.ext subsection length can wrap the pointer addition used by
btf_ext_parse_sec_info() on 32-bit builds. The wrapped pointer passes the
bounds check and parsing then reads beyond the copied BTF.ext data.

Validate the offset and length with subtraction before forming the section
pointer.

Fixes: ae4ab4b ("btf: expose API to work with raw btf_ext data")
Closes: https://issues.oss-fuzz.com/issues/477315119
Signed-off-by: Darren Carreras <carrerasdarren@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant