[radvd-devel-l] radvd security issues
reubenhwk at gmail.com
Tue Oct 4 09:27:47 EDT 2011
On Tue, Oct 4, 2011 at 4:07 AM, Vasiliy Kulikov <segoon at openwall.com> wrote:
> (removed netbsd from cc list)
> On Tue, Oct 04, 2011 at 00:56 -0700, Reuben Hawkins wrote:
>> On Fri, Sep 30, 2011 at 11:46 AM, Vasiliy Kulikov <segoon at openwall.com> wrote:
>> > 5) process_rs() shouldn't do mdelay() in the same thread in which it
>> > handles all input. If ->UnicastOnly is set, one may flood with
>> > ND_ROUTER_SOLICIT, fill input queue of our daemon and cause approx.
>> > MAX_RA_DELAY_TIME / 2 * sizeof_input_queue delay in handling new.
>> > clients.
>> Was there a patch for this too? It seems your patch leaves this code
>> as is. The radvd spec calls for a random delay before sending a
>> message. I don't particularly like it, but it's in the RFC (RFC 2461
>> Section 6.2.6).
> I don't known how it should be handled now, but this RFC was written in
> 1998, and probably DoS was not considered as an issue.
> RFC 2461, 6.2.6 also says (look at ignore the random delay part):
> "Upon receipt of a Router Solicitation, compute a random delay
> within the range 0 through MAX_RA_DELAY_TIME. If the computed
> value corresponds to a time later than the time the next multicast
> Router Advertisement is scheduled to be sent, _ignore the random
> delay_ and send the advertisement at the already-scheduled time."
> So, radvd shouldn't queue multiple solicits, but answer to them as if to
> a single RS.
> Also it seems to me it delays processing packets on other interfaces
> because of sleeps, no?
Yes, it does delay processing packets. I'm going to drop the mdelay.
I've always wanted to. We're going to define the random delay to
always be zero (It is technically allowed by the RFC after all). ;)
>> I do test by flooding radvd with ND_ROUTER_SOLICIT
>> already and everything seems fine (aside from pegging the CPU at
> I was thinking about addition of new clients. E.g. client A sends
> numerous RS, filling radvd's input queuse, then client B comes, and
> B gets the answer with a big delay as radvd is answering for A's RSs
> with unicast packets. B's packets also can be lost if radvd's queue is
>> > 6) signal handlers shouldn't call dlog() as dlog() calls fprintf() and
>> > fprintf() is not reentrant, which might lead to memory corruption
>> > (however, I cannot see how it can be controlled by an attacker).
>> Also, there no fix for this in the patch?
> Oops! I've found these after I've written the report, but forgot to
> update the patch. Thanks for pointing this out, indeed, no fix for 5,
> 6, and 9.
Awesome. If you look at my radvd git repo on github, I've added your
changes to the "security-patches" branch. It *may* make it simpler
for you to generate a new patch (or at least make it easier for me to
> Vasiliy Kulikov
> http://www.openwall.com - bringing security into open computing environments
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> -----END PGP SIGNATURE-----
More information about the radvd-devel-l