diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-08-06 05:34:06 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-06 22:08:38 +0200 |
commit | 17ac2e9c58b69a1e25460a568eae1b0dc0188c25 (patch) | |
tree | 99e38906c8e9e4d53aa03aa73a3d34e2d9ebd4df /net/rose/af_rose.c | |
parent | Add IDs for 3C905B-TX Fast Etherlink XL PCI (diff) | |
download | linux-17ac2e9c58b69a1e25460a568eae1b0dc0188c25.tar.xz linux-17ac2e9c58b69a1e25460a568eae1b0dc0188c25.zip |
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>
Diffstat (limited to 'net/rose/af_rose.c')
-rw-r--r-- | net/rose/af_rose.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index f0a76f6bca71..e5f478ca3d61 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c @@ -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; |