[PATCH] [179/223] DECnet: don't leak uninitialized stack byte

From: Andi Kleen
Date: Sun Dec 12 2010 - 18:55:52 EST


2.6.35-longterm review patch. If anyone has any objections, please let me know.

------------------
From: Dan Rosenberg <drosenberg@xxxxxxxxxxxxx>

commit 3c6f27bf33052ea6ba9d82369fb460726fb779c0 upstream.

A single uninitialized padding byte is leaked to userspace.

Signed-off-by: Dan Rosenberg <drosenberg@xxxxxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>

---
net/decnet/af_decnet.c | 2 ++
1 file changed, 2 insertions(+)

Index: linux/net/decnet/af_decnet.c
===================================================================
--- linux.orig/net/decnet/af_decnet.c
+++ linux/net/decnet/af_decnet.c
@@ -1556,6 +1556,8 @@ static int __dn_getsockopt(struct socket
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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/