Re: [PATCH bpf-next] libbpf: Validate ELF symbol table entry size
From: bot+bpf-ci
Date: Wed Sep 16 2026 - 18:02:06 EST
> libbpf: Validate ELF symbol table entry size
>
> elf_sym_iter_new() calculates the number of symbols by dividing the
> symbol table data size by sh_entsize. A malformed ELF file with a zero
> sh_entsize causes a division by zero.
>
> Reject symbol table sections with a zero entry size before calculating
> the number of symbols.
>
> Signed-off-by: Luis Vieira <luisflavieira@xxxxxxxxx>
This looks like a bug fix for the elf symbol iterator. Should this include:
Fixes: 3774705db171 ("libbpf: Add elf symbol iterator")
---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
CI run summary: https://github.com/kernel-patches/bpf/actions/runs/35154126900