Re: [PATCH bpf] libbpf: Fix OOB read in btf_dump_get_bitfield_value

From: patchwork-bot+netdevbpf

Date: Fri Jan 09 2026 - 19:03:30 EST


Hello:

This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@xxxxxxxxxx>:

On Wed, 7 Jan 2026 05:05:27 +0530 you wrote:
> When dumping bitfield data, btf_dump_get_bitfield_value() reads data
> based on the underlying type's size (t->size). However, it does not
> verify that the provided data buffer (data_sz) is large enough to
> contain these bytes.
>
> If btf_dump__dump_type_data() is called with a buffer smaller than
> the type's size, this leads to an out-of-bounds read. This was
> confirmed by AddressSanitizer in the linked issue.
>
> [...]

Here is the summary with links:
- [bpf] libbpf: Fix OOB read in btf_dump_get_bitfield_value
https://git.kernel.org/bpf/bpf-next/c/5714ca8cba5e

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html