* [PATCH] irda: Fix irda_getname() leak
@ 2009-08-06 13:55 Eric Dumazet
2009-08-06 20:09 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2009-08-06 13:55 UTC (permalink / raw)
To: David S. Miller; +Cc: Linux Netdev List
irda_getname() can leak kernel memory to user.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index cb762c8..3ec2b43 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -714,6 +714,7 @@ static int irda_getname(struct socket *sock, struct sockaddr *uaddr,
struct sock *sk = sock->sk;
struct irda_sock *self = irda_sk(sk);
+ memset(&saddr, 0, sizeof(saddr));
if (peer) {
if (sk->sk_state != TCP_ESTABLISHED)
return -ENOTCONN;
^ permalink raw reply related [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:55 [PATCH] irda: Fix irda_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).