netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rose: Fix rose_getname() leak
@ 2009-08-06 13:34 Eric Dumazet
  2009-08-06 20:09 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2009-08-06 13:34 UTC (permalink / raw)
  To: David S. Miller; +Cc: Linux Netdev List

rose_getname() can leak kernel memory to user.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] rose: Fix rose_getname() leak
  2009-08-06 13:34 [PATCH] rose: Fix rose_getname() leak Eric Dumazet
@ 2009-08-06 20:09 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-08-06 20:09 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 06 Aug 2009 15:34:06 +0200

> rose_getname() can leak kernel memory to user.
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied to net-2.6

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-06 20:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-06 13:34 [PATCH] rose: Fix rose_getname() leak Eric Dumazet
2009-08-06 20:09 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).