Skip to contentSkip to conversation

net: ax25: fix information leak to userland harder

PATCH Applied Kees Cook 2 participants 4 messages Jan 12, 2011 Networking

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 net: ax25: fix information leak to userland harder

Commit fe10ae53384e48c51996941b7720ee16995cbcb7 adds a memset() to clear the structure being sent back to userspace, but accidentally used the wrong size.

---
 net/ax25/af_ax25.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/ax25/af_ax25.c +1 -1
index bb86d29..6da5dae 100644
@@ -1392,7 +1392,7 @@ static int ax25_getname(struct socket *sock, struct sockaddr *uaddr,
 	ax25_cb *ax25;
 	int err = 0;
 
-	memset(fsa, 0, sizeof(fsa));
+	memset(fsa, 0, sizeof(*fsa));
 	lock_sock(sk);
 	ax25 = ax25_sk(sk);
 
Signature · 6 lines
1.7.2.3


-- 
Kees Cook
Ubuntu Security Team
author
#3 lore raw

Hi David,

Quoted 2 lines · David Miller

BTW, in the future please CC: [email protected] on all networking patches.

Yeah, I meant to, but I think my mail client ate the address somehow. Sorry about that!

-Kees

Signature · 2 lines
Kees Cook
Ubuntu Security Team