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 fe10ae5 adds a memset() to clear
the structure being sent back to userspace, but accidentally used the
wrong size.

Reported-by: Brad Spengler <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
Cc: [email protected]
Signed-off-by: David S. Miller <[email protected]>
Kees Cook authored and davem330 committed Jan 12, 2011
1 parent 343a8d1 commit 5b919f8
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
@@ -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);

0 comments on commit 5b919f8

Please sign in to comment.