mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
unix_diag: fix info leak
[ Upstream commit 6865d1e834
]
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
df290b8ea8
commit
f4358dfd80
1 changed files with 1 additions and 0 deletions
|
@ -134,6 +134,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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue