netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Prevent reading uninitialized memory with socket filters
@ 2010-11-09 22:28 Dan Rosenberg
  2010-11-09 23:03 ` Joe Perches
  2010-11-10  5:28 ` David Miller
  0 siblings, 2 replies; 14+ messages in thread
From: Dan Rosenberg @ 2010-11-09 22:28 UTC (permalink / raw)
  To: netdev; +Cc: stable, security

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@vsecurity.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.
 	 */



^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-11-10 21:25 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-09 22:28 [PATCH] Prevent reading uninitialized memory with socket filters Dan Rosenberg
2010-11-09 23:03 ` Joe Perches
2010-11-10  5:28 ` David Miller
2010-11-10  5:53   ` Eric Dumazet
2010-11-10  7:22     ` Eric Dumazet
2010-11-10 14:25       ` [PATCH] Prevent reading uninitialized memory with socketfilters Tetsuo Handa
2010-11-10 18:32         ` David Miller
2010-11-10 18:39         ` David Miller
2010-11-10 20:57           ` Ben Hutchings
2010-11-10 20:59             ` David Miller
2010-11-10 21:25               ` Ben Hutchings
2010-11-10 11:12   ` [PATCH] Prevent reading uninitialized memory with socket filters Dan Rosenberg
2010-11-10 13:19     ` Dan Rosenberg
2010-11-10 18:07     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).