mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 21:24:08 +08:00
econet: Fix econet_getname() leak
econet_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
17ac2e9c58
commit
80922bbb12
@ -520,6 +520,7 @@ static int econet_getname(struct socket *sock, struct sockaddr *uaddr,
|
||||
if (peer)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
memset(sec, 0, sizeof(*sec));
|
||||
mutex_lock(&econet_mutex);
|
||||
|
||||
sk = sock->sk;
|
||||
|
Loading…
Reference in New Issue
Block a user