From: Eric Dumazet Date: Thu, 6 Aug 2009 03:34:06 +0000 (+0000) Subject: rose: Fix rose_getname() leak X-Git-Tag: v2.6.31-rc7~27^2~48 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17ac2e9c58b69a1e25460a568eae1b0dc0188c25;p=profile%2Fcommon%2Fkernel-common.git rose: Fix rose_getname() leak rose_getname() can leak kernel memory to user. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index f0a76f6..e5f478c 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c @@ -954,6 +954,7 @@ static int rose_getname(struct socket *sock, struct sockaddr *uaddr, struct rose_sock *rose = rose_sk(sk); int n; + memset(srose, 0, sizeof(*srose)); if (peer != 0) { if (sk->sk_state != TCP_ESTABLISHED) return -ENOTCONN;