Commit 57cb2695 authored by Tao Chen's avatar Tao Chen Committed by Andrii Nakryiko
Browse files

bpftool: Fix UAF in get_delegate_value



The return value ret pointer is pointing opts_copy, but opts_copy
gets freed in get_delegate_value before return, fix this by free
the mntent->mnt_opts strdup memory after show delegate value.

Fixes: 2d812311 ("bpftool: Add bpf_token show")
Signed-off-by: default avatarTao Chen <chen.dylane@linux.dev>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Reviewed-by: default avatarQuentin Monnet <qmo@kernel.org>
Link: https://lore.kernel.org/bpf/20250919034816.1287280-2-chen.dylane@linux.dev
parent bce5749b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment