Commit 6865d1e834be84ddd5808d93d5035b492346c64a

Authored by Mathias Krause
Committed by David S. Miller
1 parent d022af2790

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 <minipli@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

... ... @@ -124,6 +124,7 @@
124 124 rep->udiag_family = AF_UNIX;
125 125 rep->udiag_type = sk->sk_type;
126 126 rep->udiag_state = sk->sk_state;
  127 + rep->pad = 0;
127 128 rep->udiag_ino = sk_ino;
128 129 sock_diag_save_cookie(sk, rep->udiag_cookie);
129 130