[PATCH v2 0/2] vsprintf: Don't leak pointers
From: Sebastian Andrzej Siewior
Date: Fri Aug 21 2026 - 11:27:54 EST
It is possible to leak pointers via %ps without KALLSYMS enabled.
With KALLSYMS pointers can be leaked if they can not be resolved.
The tiny series has two patches, first addresses the first issue, the
second documents why we want to keep it that way.
v1…v2: https://lore.kernel.org/all/20260814144854.746840-1-bigeasy@xxxxxxxxxxxxx/
- For %ps and !KALLSYMS no_hash_pointers is used to decide if the
pointer should be written or not. This aligns with the %p policy.
- For %ps and KALLSYMS, unresolved pointer continue to be leaked. It
has been pointed out it might be useful to see them in backtraces/
crashes if the return address became invalid.
Sebastian Andrzej Siewior (1):
vsprintf: Don't leak pointers for %ps without KALLSYMS enabled
kallsyms: Document why unresolved symbols are revealed
kernel/kallsyms.c | 7 ++++++-
lib/vsprintf.c | 4 +++-
2 files changed, 9 insertions(+), 2 deletions(-)
--
2.55.0