Subject: Re: [Security] [SECURITY] Fix leaking of kernel heap addresses via /proc

From: Willy Tarreau <[email-masked]>
Date: Mon, 8 Nov 2010 02:00:42 +0100

On Sat, Nov 06, 2010 at 04:57:03PM -0700, David Miller wrote:
> From: Linus Torvalds <[email-masked]>
> Date: Sat, 6 Nov 2010 13:50:32 -0700
> 
> > On Saturday, November 6, 2010, Dan Rosenberg <[email-masked]> wrote:
> >>
> >> Clearly, in most cases we cannot just remove the field from the /proc
> >> output, as this would break a number of userspace programs that rely on
> >> consistency.  However, I propose that we replace the address with a "0"
> >> rather than leaking this information.
> > 
> > I really think it would be much better to use the unidentified number
> > or similar.
> > 
> > Just replacing with zeroes is annoying, and has the potential of
> > losing actual information.
> 
> I would really like to see the specific examples of where this is
> happening, it sounds like something very silly to me.

It has happened to me several times to use an hex editor to check some
socket's parameters (eg: backlog) based on the pointer. Sometimes I had
even change some parameters at runtime as part of debugging sessions.

In fact we could consider than many places that return pointers could
return 0 to normal users and the real value only to root (or any special
capability). I find it important not to reduce the observability of the
kernel for the sake of security.

Regards,
Willy