Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 17ac2e9c authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

rose: Fix rose_getname() leak



rose_getname() can leak kernel memory to user.

Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b4adbb4d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;