[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100507231543.GB2098@localhost.localdomain>
Date: Fri, 7 May 2010 19:15:43 -0400
From: Neil Horman <nhorman@...driver.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, kuznet@....inr.ac.ru,
jmorris@...ei.org, yoshfuji@...ux-ipv6.org, kaber@...sh.net
Subject: Re: [PATCH] ipv4: remove ip_rt_secret timer (v3)
On Fri, May 07, 2010 at 11:04:31PM +0200, Eric Dumazet wrote:
> Le vendredi 07 mai 2010 à 15:55 -0400, Neil Horman a écrit :
> > Hey-
> > Sorry for the delay, but I got interested in Erics suggestion of
> > changing how we update rt_genid, and had a few thoughts. Heres version 3 of
> > this patch:
> >
>
> We have time, no hurry Neil.
>
Yeah, but if I don't keep on top of they slip off my todo list pretty quick :)
> > Change Notes:
> >
> > 1) Removed the secret_interval binary interface entry in the list (forgot to do
> > that before)
> >
> > 2) Took Erics Suggestion to change the update for net->ipv4.rt_genid. Now
> > instead of doing a small incremental change, we simply grab 32 new random bits.
> >
>
> My suggestion was to initialize _once_ at boot time, the _full_ 32bits.
>
Apologies, my read of your statement was that you wanted to randomize the genid
every iteration, not just the first, to avoid the genid n+1 being within 256 of
the last genid.
> Not to change the perturbations, they are very fine, and need no extra
> CONFIG_SOME_MAGICAL_SWITCH.
>
> We have a guarantee that no duplicates are delivered unless you perform
> 2^24 generations in a short period of time.
>
Yes, I mentioned that, thats why I added the index check.
> But because you want to change full 32bits, you need a complex dupcheck
> thing ?
>
We don't _need_ it, thats why I made it configurable.
> > 3) The change in (2) got me thinking that part of the reason we used the Jenkins
> > hash in rt_genid was to ensure non-repetion of id's in a short time period
> > (which is important, so as not to inadvertently reuse route cache entries that
> > should be getting expired). While extra randomness makes it harder for
> > attackers to guess the secret, it makes it possible to return to previously
> > guessed values as well (if they're lucky). As such, I created a configurable
> > option, CONFIG_GENID_DUPCHECK. With this option on, the low order 8 bits of the
> > genid are replaced with a rolling counter, that increments on each new genid.
> > This creates in effect, a 256 deep list of previously used genid values. In
> > rt_drop we compare the genids for duplicates. If we find that 2 genid values
> > have different indexes, but idential remaining bits, they are noted as a repeat
> > genid, and we call rt_cache_invalidate to generate a new genid and avoid the
> > duplication problem.
> >
> >
>
> This is not necessary and over engineering if you ask me.
>
I can't say I disagree, but I was looking at this change based on your
suggestion.
> You now rely on probabilistic rules, and depends on get_random_bytes()
> be really random, or a new CONFIG setting...
>
> What exact problem do you want to solve Neil ?
>
You know good and well what I'm trying to do here, don't be thick. The only
reason I was making changes to the genid in the first place was because you were
asking for them. I'm more than happy to make a simpler version of this.
Apologies for not interpreting your previous request the way you had intended.
> Please submit your initial patch, with the small changes :
>
> 1) Remove the secret_interval binary interface entry in the list
>
> 2) Initialize full 32bits at struct net init time.
>
Yeah, ok. I'll repost on monday.
Thanks
Neil
--
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