[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090812.204247.183387787.davem@davemloft.net>
Date: Wed, 12 Aug 2009 20:42:47 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: herbert@...dor.apana.org.au
Cc: joamaki@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH] Fix xfrm hash collisions by changing
__xfrm4_daddr_saddr_hash to hash addresses with addition
From: Herbert Xu <herbert@...dor.apana.org.au>
Date: Thu, 13 Aug 2009 12:06:06 +1000
> Jussi Maki <joamaki@...il.com> wrote:
>>
>> diff --git a/net/xfrm/xfrm_hash.h b/net/xfrm/xfrm_hash.h
>> index d401dc8..e5195c9 100644
>> --- a/net/xfrm/xfrm_hash.h
>> +++ b/net/xfrm/xfrm_hash.h
>> @@ -16,7 +16,7 @@ static inline unsigned int __xfrm6_addr_hash(xfrm_address_t *addr)
>>
>> static inline unsigned int __xfrm4_daddr_saddr_hash(xfrm_address_t *daddr, xfrm_address_t *saddr)
>> {
>> - return ntohl(daddr->a4 ^ saddr->a4);
>> + return ntohl(daddr->a4 + saddr->a4);
>> }
>
> What if the other side intentionally picks a destination addresses
> to create collisions? Actually it's even easier than that. We
> don't include the SPI in the hash so regardless of how we hash
> it, our peer can simply continue to create SAs with the same
> descriptors and they'll all hash to the same bucket.
Isn't it fruitless to talk about exploiting SA IDs when such things
are setup using an encrypted negotiation sequence and some level of
trust?
Just wondering :-)
--
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