public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: ax25: fix information leak to userland harder
@ 2011-01-12  5:40 Kees Cook
  2011-01-12  8:34 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Kees Cook @ 2011-01-12  5:40 UTC (permalink / raw)
  To: linux-kernel
  Cc: Brad Spengler, Vasiliy Kulikov, David S. Miller,
	netdev@vger.kernel.org Joerg Reuter, Ralf Baechle

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

Reported-by: Brad Spengler <spender@grsecurity.net>
Signed-off-by: Kees Cook <kees.cook@canonical.com>
Cc: stable@kernel.org
---
 net/ax25/af_ax25.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index bb86d29..6da5dae 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -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);
 
-- 
1.7.2.3


-- 
Kees Cook
Ubuntu Security Team

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

end of thread, other threads:[~2011-01-12 14:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-12  5:40 [PATCH] net: ax25: fix information leak to userland harder Kees Cook
2011-01-12  8:34 ` David Miller
2011-01-12  8:35   ` David Miller
2011-01-12 14:01     ` Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox