public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	Andrey Konovalov <andreyknvl@google.com>,
	Dmitry Vyukov <dvyukov@google.com>
Subject: Re: [PATCH] fib_trie: remove potential out of bound access
Date: Mon, 05 Aug 2013 16:00:56 -0700	[thread overview]
Message-ID: <1375743656.4457.48.camel@edumazet-glaptop> (raw)
In-Reply-To: <20130805154111.119ac5ac@nehalam.linuxnetplumber.net>

On Mon, 2013-08-05 at 15:41 -0700, Stephen Hemminger wrote:
> On Mon, 05 Aug 2013 11:18:49 -0700
> Eric Dumazet <eric.dumazet@gmail.com> wrote:
> 
> > From: Eric Dumazet <edumazet@google.com>
> > 
> > AddressSanitizer [1] dynamic checker pointed a potential
> > out of bound access in leaf_walk_rcu()
> > 
> > We could allocate one more slot in tnode_new() to leave the prefetch()
> > in-place but it looks not worth the pain.
> > 
> > Bug added in commit 82cfbb008572b ("[IPV4] fib_trie: iterator recode")
> > 
> > [1] :
> > https://code.google.com/p/address-sanitizer/wiki/AddressSanitizerForKernel
> > 
> > Reported-by: Andrey Konovalov <andreyknvl@google.com>
> > Signed-off-by: Eric Dumazet <edumazet@google.com>
> > Cc: Dmitry Vyukov <dvyukov@google.com>
> 
> Isn't prefetch supposed to always be safe, even out of bounds; even prefetch(NULL).
> Although I really doubt prefetch helps in in this code anyway.


prefetch(...) was not the problem here.

The problem was X = array[N]   with N being >= size(array)

      reply	other threads:[~2013-08-05 23:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-05 18:18 [PATCH] fib_trie: remove potential out of bound access Eric Dumazet
2013-08-05 22:27 ` David Miller
2013-08-05 22:41 ` Stephen Hemminger
2013-08-05 23:00   ` Eric Dumazet [this message]

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=1375743656.4457.48.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=andreyknvl@google.com \
    --cc=davem@davemloft.net \
    --cc=dvyukov@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.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