public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Dan Rosenberg <drosenberg@vsecurity•com>
To: chas@cmf•nrl.navy.mil, davem@davemloft•net, kuznet@ms2•inr.ac.ru,
	pekkas@netcore•fi, jmorris@namei•org, yoshfuji@linux-ipv6•org,
	kaber@trash•net, remi.denis-courmont@nokia•com
Cc: netdev@vger•kernel.org, security@kernel•org, stable@kernel•org
Subject: [PATCH 9/9] Fix leaking of kernel heap addresses in net/
Date: Sun, 07 Nov 2010 11:33:08 -0500	[thread overview]
Message-ID: <1289147588.3090.147.camel@Dan> (raw)

Signed-off-by: Dan Rosenberg <drosenberg@vsecurity•com>

diff -urp linux-2.6.37-rc1.orig/net/unix/af_unix.c linux-2.6.37-rc1/net/unix/af_unix.c
--- linux-2.6.37-rc1.orig/net/unix/af_unix.c	2010-11-01 07:54:12.000000000 -0400
+++ linux-2.6.37-rc1/net/unix/af_unix.c	2010-11-07 10:46:27.000000000 -0500
@@ -353,7 +353,8 @@ static void unix_sock_destructor(struct 
 	WARN_ON(!sk_unhashed(sk));
 	WARN_ON(sk->sk_socket);
 	if (!sock_flag(sk, SOCK_DEAD)) {
-		printk(KERN_INFO "Attempt to release alive unix socket: %p\n", sk);
+		printk(KERN_INFO "Attempt to release alive unix socket: %lu\n",
+			sock_i_ino(sk));
 		return;
 	}
 
@@ -2198,8 +2199,8 @@ static int unix_seq_show(struct seq_file
 		struct unix_sock *u = unix_sk(s);
 		unix_state_lock(s);
 
-		seq_printf(seq, "%p: %08X %08X %08X %04X %02X %5lu",
-			s,
+		seq_printf(seq, "%d: %08X %08X %08X %04X %02X %5lu",
+			0,
 			atomic_read(&s->sk_refcnt),
 			0,
 			s->sk_state == TCP_LISTEN ? __SO_ACCEPTCON : 0,




                 reply	other threads:[~2010-11-07 16:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1289147588.3090.147.camel@Dan \
    --to=drosenberg@vsecurity$(echo .)com \
    --cc=chas@cmf$(echo .)nrl.navy.mil \
    --cc=davem@davemloft$(echo .)net \
    --cc=jmorris@namei$(echo .)org \
    --cc=kaber@trash$(echo .)net \
    --cc=kuznet@ms2$(echo .)inr.ac.ru \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pekkas@netcore$(echo .)fi \
    --cc=remi.denis-courmont@nokia$(echo .)com \
    --cc=security@kernel$(echo .)org \
    --cc=stable@kernel$(echo .)org \
    --cc=yoshfuji@linux-ipv6$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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