summaryrefslogtreecommitdiff
path: root/include/linux/debugobjects.h
diff options
context:
space:
mode:
authorLuis Vieira <luisflavieira@gmail.com>2026-09-15 15:13:35 -0300
committerAndrii Nakryiko <andrii@kernel.org>2026-09-17 15:21:30 -0700
commit8cca9a6bb68181bf50f3a9b4c54c06cd695be4dc (patch)
treed421bbae8f138ca70e1bc442ab9e18925aef9616 /include/linux/debugobjects.h
parentfa3da65dc16ea161536020ee5462d53d34879f96 (diff)
libbpf: Fix program log buffer size validation
bpf_program__set_log_buf() checks the existing prog->log_size instead of the incoming log_size argument when enforcing the UINT_MAX limit. As a result, an oversized value can be accepted. The setter also accepts a non-NULL log_buf with a zero log_size, while bpf_prog_load() rejects mismatched log buffer and size values. Validate the log buffer and size pair consistently with bpf_prog_load(), and check the supplied log_size against UINT_MAX. Signed-off-by: Luis Vieira <luisflavieira@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Mykyta Yatsenko <yatsenko@meta.com> Link: https://lore.kernel.org/bpf/20260915-libbpf-log-buf-fix-v2-1-2feca3fa4842@gmail.com
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions