mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 14:43:16 +00:00
rose: Fix rose_getname() leak
rose_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>
This commit is contained in:
parent
b4adbb4ddf
commit
17ac2e9c58
@ -954,6 +954,7 @@ static int rose_getname(struct socket *sock, struct sockaddr *uaddr,
|
||||
struct rose_sock *rose = rose_sk(sk);
|
||||
int n;
|
||||
|
||||
memset(srose, 0, sizeof(*srose));
|
||||
if (peer != 0) {
|
||||
if (sk->sk_state != TCP_ESTABLISHED)
|
||||
return -ENOTCONN;
|
||||
|
Loading…
x
Reference in New Issue
Block a user