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

From: Oliver Hartkopp <[email-masked]>
Date: Sun, 07 Nov 2010 11:28:08 +0100

On 07.11.2010 00:57, 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.

Indeed Urs and me had a similar discussion before we decided to put different
(user relevant) content into the procfs output and break the current layout:

http://patchwork.ozlabs.org/patch/70282/

The layout break was ok in this case as the people using the CAN procfs stuff
do this only when facing problems (with their applications) at runtime.

A discussed approach that won't break the procfs layout was to set the values
to "0" and only fill them with real content depending on CONFIG_DEBUG_INFO .

Would that fit here?

Or maybe a different config option CONFIG_DEBUG_KERNEL_ADDR would do the job,
as i don't know which distros enable CONFIG_DEBUG_INFO by default ...

Regards,
Oliver