On Sat, 2025-12-20 at 19:18 +0100, Maurice Hieronymus wrote:
> modbuildid is never set when kallsyms_lookup_buildid is returning via
> successful bpf_address_lookup or ftrace_mod_address_lookup.
> 
> This leads to an uninitialized pointer dereference on x86 when
> CONFIG_STACKTRACE_BUILD_ID=y inside __sprint_symbol.
> 
> Prevent this by always initializing modbuildid.
> 
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220717
> 
> Changes to v3:
> - Split the changes into separate ftrace and bpf patches
> - Replace IS_ENABLED() with plain #ifdef
> 
> Maurice Hieronymus (2):
>   kallsyms: Always initialize modbuildid on ftrace address
>   kallsyms: Always initialize modbuildid on bpf address
> 
>  include/linux/filter.h | 6 ++++--
>  include/linux/ftrace.h | 4 ++--
>  kernel/kallsyms.c      | 4 ++--
>  kernel/trace/ftrace.c  | 8 +++++++-
>  4 files changed, 15 insertions(+), 7 deletions(-)
> 
> 
> base-commit: dd9b004b7ff3289fb7bae35130c0a5c0537266af

This patch is obsolete and already fixed by [1]

[1]
https://lore.kernel.org/bpf/[email protected]/#t

Reply via email to