Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 9 Nov 2017 16:45:48 +1100
From: "Tobin C. Harding" <>
To: Steven Rostedt <>
	"Jason A. Donenfeld" <>,	Theodore Ts'o <>,
	Linus Torvalds <>,
	Kees Cook <>,	Paolo Bonzini <>,
	Tycho Andersen <>,	"Roberts,
 William C" <>,	Tejun Heo <>,
	Jordan Glover <>,
	Greg KH <>,	Petr Mladek <>,
 Joe Perches <>,	Ian Campbell <>,
	Sergey Senozhatsky <>,
	Catalin Marinas <>,
	Will Deacon <>, Chris Fries <>,
	Dave Weinstein <>,	Daniel Micay <>,
	Djalal Harouni <>,
	"Paul E. McKenney" <>,
	Andy Lutomirski <>,	Peter Zijlstra <>,
	David Miller <>,
	Network Development <>,
Subject: Re: [PATCH] kallsyms: don't leak address when printing symbol

On Wed, Nov 08, 2017 at 10:35:55PM -0500, Steven Rostedt wrote:
> On Thu,  9 Nov 2017 12:50:29 +1100
> "Tobin C. Harding" <> wrote:
> > Currently if a pointer is printed using %p[ssB] and the symbol is not
> > found (kallsyms_lookup() fails) then we print the actual address. This
> > leaks kernel addresses. We should instead print something _safe_.
> > 
> > Print "<no-symbol>" instead of kernel address.
> Ug, ftrace requires this to work as is, as it uses it to print some
> addresses that may or may not be a symbol.
> If anything, can this return a success or failure if it were to find a
> symbol or not, and then something like ftrace could decide to use %x if
> it does not.

Thanks for the feed back Steve. Propagating the error back up through
the call chain may require a little bit of thought so we don't upset the
apple cart. sprint_symbol() never currently (as far as I can see)
returns an error. I can go through the other callers of sprint_symbol()
(there aren't many) and check if it is going to upset anything.

> And yes, ftrace leaks kernel addresses all over the place, that's just
> the nature of tracing the kernel.

Would it be good for you (for this change and future changes aimed at
closing leaks) if any changes like this include patches to ftrace to
maintain the current behaviour?

You have been on the CC list for the printk hashing and what not since
the start I believe so you know I'm a noob, feel free to scream bloody
murder if I'm breaching protocol.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.