Skip to content

Commit

Permalink
net: ax25: fix information leak to userland harder
Browse files Browse the repository at this point in the history
commit 5b919f8 upstream.

Commit fe10ae5 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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Kees Cook authored and Greg Kroah-Hartman committed Apr 22, 2011
1 parent 6f396d4 commit c4f6afb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ax25/af_ax25.c
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,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);

Expand Down

0 comments on commit c4f6afb

Please sign in to comment.