Patchwork appletalk: info leak in ->getname()

login
register
mail settings
Submitter Dan Carpenter
Date April 23, 2013, 6:22 a.m.
Message ID <20130423062215.GA15893@elgon.mountain>
Download mbox | patch
Permalink /patch/238763/
State Accepted
Delegated to: David Miller
Headers show

Comments

Dan Carpenter - April 23, 2013, 6:22 a.m.
There is a one byte hole between ->sat_port and ->sat_addr.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - April 25, 2013, 5:48 a.m.
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Tue, 23 Apr 2013 09:22:15 +0300

> There is a one byte hole between ->sat_port and ->sat_addr.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c
index 4a141e3..ef12839 100644
--- a/net/appletalk/ddp.c
+++ b/net/appletalk/ddp.c
@@ -1253,7 +1253,7 @@  static int atalk_getname(struct socket *sock, struct sockaddr *uaddr,
 			goto out;
 
 	*uaddr_len = sizeof(struct sockaddr_at);
-	memset(&sat.sat_zero, 0, sizeof(sat.sat_zero));
+	memset(&sat, 0, sizeof(sat));
 
 	if (peer) {
 		err = -ENOTCONN;