Skip to content

Commit

Permalink
DECnet: don't leak uninitialized stack byte
Browse files Browse the repository at this point in the history
A single uninitialized padding byte is leaked to userspace.

Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
CC: stable <stable@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Rosenberg authored and davem330 committed Nov 28, 2010
1 parent 462ca99 commit 3c6f27b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/decnet/af_decnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1556,6 +1556,8 @@ static int __dn_getsockopt(struct socket *sock, int level,int optname, char __us
if (r_len > sizeof(struct linkinfo_dn))
r_len = sizeof(struct linkinfo_dn);

memset(&link, 0, sizeof(link));

switch(sock->state) {
case SS_CONNECTING:
link.idn_linkstate = LL_CONNECTING;
Expand Down

0 comments on commit 3c6f27b

Please sign in to comment.