Linux Trace Kernel
 help / color / mirror / Atom feed
* [PATCH v4 0/2] kallsyms: Always initialize modbuildid
@ 2025-12-20 18:18 Maurice Hieronymus
  2025-12-20 18:18 ` [PATCH v4 1/2] kallsyms: Always initialize modbuildid on ftrace address Maurice Hieronymus
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Maurice Hieronymus @ 2025-12-20 18:18 UTC (permalink / raw)
  To: ast, daniel, john.fastabend, andrii, martin.lau, eddyz87, song,
	yonghong.song, kpsingh, sdf, haoluo, jolsa, rostedt, mhiramat,
	mark.rutland, mathieu.desnoyers
  Cc: georges.aureau, bpf, linux-kernel, linux-trace-kernel, mhi

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
-- 
2.50.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-01-07 19:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-20 18:18 [PATCH v4 0/2] kallsyms: Always initialize modbuildid Maurice Hieronymus
2025-12-20 18:18 ` [PATCH v4 1/2] kallsyms: Always initialize modbuildid on ftrace address Maurice Hieronymus
2026-01-07 19:44   ` Steven Rostedt
2025-12-20 18:18 ` [PATCH v4 2/2] kallsyms: Always initialize modbuildid on bpf address Maurice Hieronymus
2025-12-21 18:17   ` Alexei Starovoitov
2025-12-21 18:44 ` [PATCH v4 0/2] kallsyms: Always initialize modbuildid Maurice Hieronymus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox