netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: drosenberg@vsecurity.com, netdev@vger.kernel.org,
	stable@kernel.org, security@kernel.org
Subject: Re: [PATCH] Prevent reading uninitialized memory with socketfilters
Date: Wed, 10 Nov 2010 10:38:07 -0800 (PST)	[thread overview]
Message-ID: <20101110.103807.39173013.davem@davemloft.net> (raw)
In-Reply-To: <1289414024.2469.20.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 10 Nov 2010 19:33:44 +0100

> Most filters dont use mem[] at all, so the added cost seems OK to me,
> but we can work to use a compile time check, to make memset(mem, 0,
> length) a filter parameter if you prefer removing the test on each
> load(mem[K]).
> 
> This memset() could be avoided if the compiler() can be sure all
> load(mem[K]) follow a prior store(mem[K])
> 
> Its not a five minutes patch, I tried to work on it but it was a bit
> hard, for a very remote security risk.
> 
> (On x86 platform, incoming packets are handled in SOFTIRQ stack, not the
> kernel stack of current thread anyway)

Understood, I'm going to apply your patch for now with the
"const filter pointer" and "u32 f_k = fentry->k;" changes.

  reply	other threads:[~2010-11-10 18:37 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-10 18:18 [PATCH] Prevent reading uninitialized memory with socketfilters Dan Rosenberg
2010-11-10 18:21 ` David Miller
2010-11-10 18:33   ` Eric Dumazet
2010-11-10 18:38     ` David Miller [this message]
2010-11-16 13:08       ` [PATCH] filter: Optimize instruction revalidation code Tetsuo Handa
2010-11-16 13:11         ` Michael Tokarev
2010-11-16 13:44         ` Eric Dumazet
2010-11-16 14:31           ` [PATCH v2] " Tetsuo Handa
2010-11-16 16:30             ` Eric Dumazet
2010-11-17  1:19               ` [PATCH v3] " Tetsuo Handa
2010-11-17  7:48                 ` Eric Dumazet
2010-11-17  7:54                   ` Changli Gao
2010-11-17  8:18                     ` Eric Dumazet
2010-11-17  8:06                   ` Tetsuo Handa
2010-11-17  9:01                     ` Hagen Paul Pfeifer
2010-11-18 18:58                 ` David Miller
2010-11-16 22:13         ` [PATCH] " Hagen Paul Pfeifer
2010-11-16 23:31           ` Changli Gao
2010-11-16 23:45             ` Hagen Paul Pfeifer
2010-11-16 23:24         ` Changli Gao
  -- strict thread matches above, loose matches on Subject: below --
2010-11-10 18:25 [PATCH] Prevent reading uninitialized memory with socketfilters Dan Rosenberg
2010-11-09 22:28 [PATCH] Prevent reading uninitialized memory with socket filters Dan Rosenberg
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

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=20101110.103807.39173013.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=drosenberg@vsecurity.com \
    --cc=eric.dumazet@gmail.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).