[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1289346817.7380.16.camel@dan>
Date: Tue, 09 Nov 2010 18:53:37 -0500
From: Dan Rosenberg <drosenberg@...curity.com>
To: netdev@...r.kernel.org
Cc: security@...nel.org, stable@...nel.org
Subject: [PATCH v2] Prevent reading uninitialized memory with socket filters
As requested, avoiding the memset.
Signed-off-by: Dan Rosenberg <drosenberg@...curity.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;
--
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