public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: andi@firstfloor.org, drosenberg@vsecurity.com,
	chas3@users.sourceforge.net, tytso@mit.edu,
	torvalds@linux-foundation.org, kuznet@ms2.inr.ac.ru,
	pekkas@netcore.fi, jmorris@namei.org, yoshfuji@linux-ipv6.org,
	kaber@trash.net, remi.denis-courmont@nokia.com,
	netdev@vger.kernel.org, security@kernel.org
Subject: Re: [Security] [SECURITY] Fix leaking of kernel heap addresses via /proc
Date: Mon, 08 Nov 2010 08:33:32 +0100	[thread overview]
Message-ID: <1289201612.2478.371.camel@edumazet-laptop> (raw)
In-Reply-To: <20101107.180108.71121019.davem@davemloft.net>

Le dimanche 07 novembre 2010 à 18:01 -0800, David Miller a écrit :
> From: Andi Kleen <andi@firstfloor.org>
> Date: Mon, 8 Nov 2010 00:56:10 +0100
> 
> > I would just remove the pointers from /proc and supply 
> > gdb macros that extract the equivalent information from /proc/kcore.
> > This is a bit racy, but for debugging it should be no
> > problem to run them multiple times as needed.
> 
> I do not think at all that this is tenable for the kind of
> things people use the socket pointers for when debugging
> problems.
> 
> I defeinitely prefer the inode number to this idea.

We currently have no guarantee of sockets inode numbers unicity.
I admit chances of clash are low.

When a printk() happens right before a BUG(), how are we going to check
the dumped registers are possibly close the socket involved, if we dont
have access to the machine, and only the crashlog ?

BTW, any local user can look at "dmesg", and crash reports. These
reports are even published on a remote site (bugzilla) so that hostile
hackers can be feeded.

I am OK to delete socket pointers from /proc files for non root users
(after checking things like lsof continue to work correctly).
I dont remember using them while doing debugging stuff.

BTW, rtnetlink also expose socket pointers to non root users :

$ ss -e dst 192.168.20.108
State      Recv-Q Send-Q    Local Address:Port    Peer Address:Port   
ESTAB      0      0         10.150.51.210:46979   192.168.20.108:ssh 
timer:(keepalive,119min,0) ino:136919 sk:ffff88002129d7c0


Mixing in same patch /proc pointers removal and printk() pointers
removal seems wrong to me. Very different problems.




  reply	other threads:[~2010-11-08  7:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-06 20:11 [SECURITY] Fix leaking of kernel heap addresses via /proc Dan Rosenberg
2010-11-06 20:50 ` [Security] " Linus Torvalds
2010-11-06 23:48   ` Ted Ts'o
2010-11-07 21:52     ` Andi Kleen
2010-11-07 22:48       ` Chas Williams (CONTRACTOR)
2010-11-07 23:14         ` Andi Kleen
2010-11-07 23:22         ` Linus Torvalds
2010-11-07 23:29           ` Andi Kleen
2010-11-07 23:27         ` Dan Rosenberg
2010-11-07 23:56           ` Andi Kleen
2010-11-08  2:01             ` David Miller
2010-11-08  7:33               ` Eric Dumazet [this message]
2010-11-08  9:43                 ` Andi Kleen
2010-11-08 10:14                   ` Eric Dumazet
2010-11-06 23:57   ` David Miller
2010-11-07 10:28     ` Oliver Hartkopp
2010-11-07 17:11       ` Ben Hutchings
2010-11-08  1:00     ` Willy Tarreau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1289201612.2478.371.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=andi@firstfloor.org \
    --cc=chas3@users.sourceforge.net \
    --cc=davem@davemloft.net \
    --cc=drosenberg@vsecurity.com \
    --cc=jmorris@namei.org \
    --cc=kaber@trash.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@vger.kernel.org \
    --cc=pekkas@netcore.fi \
    --cc=remi.denis-courmont@nokia.com \
    --cc=security@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@mit.edu \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox