projects
/
platform
/
kernel
/
linux-arm64.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d022af2
)
unix_diag: fix info leak
author
Mathias Krause
<minipli@googlemail.com>
Mon, 30 Sep 2013 20:05:40 +0000
(22:05 +0200)
committer
David S. Miller
<davem@davemloft.net>
Wed, 2 Oct 2013 20:08:24 +0000
(16:08 -0400)
When filling the netlink message we miss to wipe the pad field,
therefore leak one byte of heap memory to userland. Fix this by
setting pad to 0.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/unix/diag.c
patch
|
blob
|
history
diff --git
a/net/unix/diag.c
b/net/unix/diag.c
index
d591091
..
86fa0f3
100644
(file)
--- a/
net/unix/diag.c
+++ b/
net/unix/diag.c
@@
-124,6
+124,7
@@
static int sk_diag_fill(struct sock *sk, struct sk_buff *skb, struct unix_diag_r
rep->udiag_family = AF_UNIX;
rep->udiag_type = sk->sk_type;
rep->udiag_state = sk->sk_state;
+ rep->pad = 0;
rep->udiag_ino = sk_ino;
sock_diag_save_cookie(sk, rep->udiag_cookie);