[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1289341724.7380.13.camel@dan>
Date: Tue, 09 Nov 2010 17:28:44 -0500
From: Dan Rosenberg <drosenberg@...curity.com>
To: netdev@...r.kernel.org
Cc: stable@...nel.org, security@...nel.org
Subject: [PATCH] Prevent reading uninitialized memory with socket filters
The "mem" array used as scratch space for socket filters is not
initialized, allowing unprivileged users to leak kernel stack bytes.
Signed-off-by: Dan Rosenberg <drosenberg@...curity.com>
---
net/core/filter.c | 2 ++
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/core/filter.c b/net/core/filter.c
index 7beaec3..2749ba0 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -121,6 +121,8 @@ unsigned int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int
int k;
int pc;
+ memset(mem, 0, sizeof(mem));
+
/*
* Process array of filter instructions.
*/
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists