Skip to content

libbpf: Fix out-of-bound read in bpf_linker__add_buf()#11000

Closed
ameryhung wants to merge 1 commit intokernel-patches:bpf-next_basefrom
ameryhung:libbpf_pr945
Closed

libbpf: Fix out-of-bound read in bpf_linker__add_buf()#11000
ameryhung wants to merge 1 commit intokernel-patches:bpf-next_basefrom
ameryhung:libbpf_pr945

Conversation

@ameryhung
Copy link
Contributor

Fix a potential out-of-bound read in bpf_linker__add_buf() by advancing the buffer pointer and reducing the remaining buffer size passed to write() in each iteration. The bug is reported in 0.

Fixes: 6d5e5e5 ("libbpf: Extend linker API to support in-memory ELF files")

Fix a potential out-of-bound read in bpf_linker__add_buf() by advancing
the buffer pointer and reducing the remaining buffer size passed to
write() in each iteration. The bug is reported in [0].

[0]: libbpf/libbpf#945

Fixes: 6d5e5e5 ("libbpf: Extend linker API to support in-memory ELF files")
Signed-off-by: Amery Hung <ameryhung@gmail.com>
@kernel-patches-daemon-bpf kernel-patches-daemon-bpf bot force-pushed the bpf-next_base branch 11 times, most recently from a4a9811 to 2650068 Compare February 13, 2026 22:49
@kernel-patches-daemon-bpf
Copy link

Automatically cleaning up stale PR; feel free to reopen if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant