mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 19:07:52 +00:00
irda: Fix irda_getname() leak
irda_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
3d392475c8
commit
09384dfc76
1 changed files with 1 additions and 0 deletions
|
@ -714,6 +714,7 @@ static int irda_getname(struct socket *sock, struct sockaddr *uaddr,
|
||||||
struct sock *sk = sock->sk;
|
struct sock *sk = sock->sk;
|
||||||
struct irda_sock *self = irda_sk(sk);
|
struct irda_sock *self = irda_sk(sk);
|
||||||
|
|
||||||
|
memset(&saddr, 0, sizeof(saddr));
|
||||||
if (peer) {
|
if (peer) {
|
||||||
if (sk->sk_state != TCP_ESTABLISHED)
|
if (sk->sk_state != TCP_ESTABLISHED)
|
||||||
return -ENOTCONN;
|
return -ENOTCONN;
|
||||||
|
|
Loading…
Reference in a new issue