All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Rosenberg <drosenberg@vsecurity.com>
To: netdev@vger.kernel.org
Cc: stable@kernel.org, security@kernel.org
Subject: [PATCH] Prevent reading uninitialized memory with socket filters
Date: Tue, 09 Nov 2010 17:28:44 -0500	[thread overview]
Message-ID: <1289341724.7380.13.camel@dan> (raw)

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



             reply	other threads:[~2010-11-09 22:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-09 22:28 Dan Rosenberg [this message]
2010-11-09 23:03 ` [PATCH] Prevent reading uninitialized memory with socket filters 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1289341724.7380.13.camel@dan \
    --to=drosenberg@vsecurity.com \
    --cc=netdev@vger.kernel.org \
    --cc=security@kernel.org \
    --cc=stable@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.