Re: [PATCH 3/9] Fix leaking of kernel heap addresses in net/

Eric Dumazet
2010-11-07T17:11:18Z

Le dimanche 07 novembre 2010 à 11:31 -0500, Dan Rosenberg a écrit :
> Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
>
> diff -urp linux-2.6.37-rc1.orig/net/ipv4/af_inet.c linux-2.6.37-rc1/net/ipv4/af_inet.c
> --- linux-2.6.37-rc1.orig/net/ipv4/af_inet.c 2010-11-01 07:54:12.000000000 -0400
> +++ linux-2.6.37-rc1/net/ipv4/af_inet.c 2010-11-07 10:31:41.000000000 -0500
> @@ -139,12 +139,13 @@ void inet_sock_destruct(struct sock *sk)
> sk_mem_reclaim(sk);
>
> if (sk->sk_type == SOCK_STREAM && sk->sk_state != TCP_CLOSE) {
> - pr_err("Attempt to release TCP socket in state %d %p\n",
> - sk->sk_state, sk);
> + pr_err("Attempt to release TCP socket in state %d %lu\n",
> + sk->sk_state, sock_i_ino(sk));
> return;
> }

Why a non root user can read this debugging stuff, I ask.

I suggest "dmesg" for them sends them a Windows XP system log,
and /proc/cpuinfo pretends machine is a Z80, somewhat modified to have
65536 cores.