Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: nhorman@tuxdriver.com
Cc: tgraf@suug.ch, netdev@vger.kernel.org
Subject: Re: [PATCH] ipv6: Prevent access to uninitialized fib_table_hash via /proc/net/ipv6_route
Date: Fri, 15 Jun 2012 15:32:40 -0700 (PDT)	[thread overview]
Message-ID: <20120615.153240.1699971156820399680.davem@davemloft.net> (raw)
In-Reply-To: <20120615105655.GA22945@hmsreliant.think-freely.org>

From: Neil Horman <nhorman@tuxdriver.com>
Date: Fri, 15 Jun 2012 06:56:55 -0400

> On Fri, Jun 15, 2012 at 11:00:17AM +0200, Thomas Graf wrote:
>> /proc/net/ipv6_route reflects the contents of fib_table_hash. The proc
>> handler is installed in ip6_route_net_init() whereas fib_table_hash is
>> allocated in fib6_net_init() _after_ the proc handler has been installed.
>> 
>> This opens up a short time frame to access fib_table_hash with its pants
>> down.
>> 
>> fib6_init() as a whole can't be moved to an earlier position as it also
>> registers the rtnetlink message handlers which should be registered at
>> the end. Therefore split it into fib6_init() which is run early and
>> fib6_init_late() to register the rtnetlink message handlers.
>> 
>> Signed-off-by: Thomas Graf <tgraf@suug.ch>
> Reviewed-by: Neil Horman <nhorman@tuxdriver.com>

Applied.

Since you're snooping around in here, you might notice that on network
namespace shutdown, we leak all user configured ipv6 FIB rules.

  reply	other threads:[~2012-06-15 22:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-15  9:00 [PATCH] ipv6: Prevent access to uninitialized fib_table_hash via /proc/net/ipv6_route Thomas Graf
2012-06-15 10:56 ` Neil Horman
2012-06-15 22:32   ` David Miller [this message]
2012-06-16  5:15     ` David Miller
2012-06-16  8:13       ` David Miller
2012-06-16 13:07       ` Neil Horman
2012-06-16 22:22         ` David Miller
2012-06-17  6:11       ` Thomas Graf
2012-06-19 11:36     ` Thomas Graf
2012-06-19 21:13       ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2012-06-16  9:46 Sedat Dilek

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=20120615.153240.1699971156820399680.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=tgraf@suug.ch \
    /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