[PATCH v2 0/2] vsprintf: Don't leak pointers

Sebastian Andrzej Siewior posted 2 patches 1 month, 1 week ago
kernel/kallsyms.c | 7 ++++++-
lib/vsprintf.c    | 4 +++-
2 files changed, 9 insertions(+), 2 deletions(-)
[PATCH v2 0/2] vsprintf: Don't leak pointers
Posted by Sebastian Andrzej Siewior 1 month, 1 week ago
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@linutronix.de/
  - 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
Re: [PATCH v2 0/2] vsprintf: Don't leak pointers
Posted by Sebastian Andrzej Siewior 1 month ago
On 2026-08-21 17:26:12 [+0200], To linux-kernel@vger.kernel.org wrote:
> 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.

sashiko is now happy
	https://sashiko.dev/#/patchset/20260821152614.2202196-1-bigeasy%40linutronix.de

It points out the "leaked if they can not be resolved" case but we can
either allow it to ease port-mortem analysis or hide it and get
complains.

Andrew?

Sebastian