From: Dan Rosenberg <drosenberg@vsecurity.com>
To: netdev@vger.kernel.org
Cc: security@kernel.org, stable@kernel.org
Subject: [PATCH v2] Prevent reading uninitialized memory with socket filters
Date: Tue, 09 Nov 2010 18:53:37 -0500 [thread overview]
Message-ID: <1289346817.7380.16.camel@dan> (raw)
As requested, avoiding the memset.
Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
diff -urp a/net/core/filter.c b/net/core/filter.c
--- a/net/core/filter.c 2010-11-08 22:10:26.820703471 -0500
+++ b/net/core/filter.c 2010-11-09 18:49:33.857201963 -0500
@@ -116,7 +116,7 @@ unsigned int sk_run_filter(struct sk_buf
void *ptr;
u32 A = 0; /* Accumulator */
u32 X = 0; /* Index Register */
- u32 mem[BPF_MEMWORDS]; /* Scratch Memory Store */
+ u32 mem[BPF_MEMWORDS] = {}; /* Scratch Memory Store */
u32 tmp;
int k;
int pc;
reply other threads:[~2010-11-09 23:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1289346817.7380.16.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 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).