unix_diag: fix info leak
Subsystems (3)
PATCH 1/1 unix_diag: fix info leak
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 <[email protected]>
---
Probably material for stable as well (v3.3+).
net/unix/diag.c | 1 + 1 file changed, 1 insertion(+)
net/unix/diag.c +1 -0
@@ -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);
Signature · 1 line
1.7.10.4
David Miller
maintainerFrom: Mathias Krause <[email protected]>
Date: Mon, 30 Sep 2013 22:05:40 +0200
Quoted 5 lines
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 <[email protected]>
Applied and queued up for -stable, thanks!