Re: [PATCH bpf-next v4 2/2] bpftool: Fix UAF in get_delegate_value
From: Quentin Monnet
Date: Fri Sep 19 2025 - 04:57:03 EST
2025-09-19 11:48 UTC+0800 ~ Tao Chen <chen.dylane@xxxxxxxxx>
> 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: 2d812311c2b2 ("bpftool: Add bpf_token show")
> Signed-off-by: Tao Chen <chen.dylane@xxxxxxxxx>
Reviewed-by: Quentin Monnet <qmo@xxxxxxxxxx>
Thank you!