mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-07 21:53:44 +00:00
netrom: Fix nr_getname() leak
commit f6b97b2951
upstream.
nr_getname() can leak kernel memory to user.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
42c6afea4b
commit
7e82873794
@ -848,6 +848,7 @@ static int nr_getname(struct socket *sock, struct sockaddr *uaddr,
|
||||
sax->fsa_ax25.sax25_family = AF_NETROM;
|
||||
sax->fsa_ax25.sax25_ndigis = 1;
|
||||
sax->fsa_ax25.sax25_call = nr->user_addr;
|
||||
memset(sax->fsa_digipeater, 0, sizeof(sax->fsa_digipeater));
|
||||
sax->fsa_digipeater[0] = nr->dest_addr;
|
||||
*uaddr_len = sizeof(struct full_sockaddr_ax25);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user