aboutsummaryrefslogtreecommitdiffstats
path: root/net/rose
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2009-08-05 23:34:06 -0400
committerDavid S. Miller <davem@davemloft.net>2009-08-06 16:08:38 -0400
commit17ac2e9c58b69a1e25460a568eae1b0dc0188c25 (patch)
tree99e38906c8e9e4d53aa03aa73a3d34e2d9ebd4df /net/rose
parentb4adbb4ddf63091f48668e7ff1b9b0f6f84d4b40 (diff)
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')
-rw-r--r--net/rose/af_rose.c1
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,
954 struct rose_sock *rose = rose_sk(sk); 954 struct rose_sock *rose = rose_sk(sk);
955 int n; 955 int n;
956 956
957 memset(srose, 0, sizeof(*srose));
957 if (peer != 0) { 958 if (peer != 0) {
958 if (sk->sk_state != TCP_ESTABLISHED) 959 if (sk->sk_state != TCP_ESTABLISHED)
959 return -ENOTCONN; 960 return -ENOTCONN;