From: David Miller <davem@davemloft.net>
To: herbert@gondor.apana.org.au
Cc: joamaki@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH] Fix xfrm hash collisions by changing __xfrm4_daddr_saddr_hash to hash addresses with addition
Date: Wed, 12 Aug 2009 20:42:47 -0700 (PDT) [thread overview]
Message-ID: <20090812.204247.183387787.davem@davemloft.net> (raw)
In-Reply-To: <20090813020606.GA18205@gondor.apana.org.au>
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Thu, 13 Aug 2009 12:06:06 +1000
> Jussi Maki <joamaki@gmail.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 :-)
next prev parent reply other threads:[~2009-08-13 3:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-05 7:41 [PATCH] xfrm: xfrm hash to use Jenkins' hash Jussi Mäki
2009-08-05 8:39 ` Jussi Maki
2009-08-05 19:08 ` David Miller
2009-08-06 6:32 ` Jussi Maki
2009-08-06 8:58 ` Jussi Maki
2009-08-06 17:40 ` David Miller
2009-08-07 7:38 ` [PATCH] Fix xfrm hash collisions by changing __xfrm4_daddr_saddr_hash to hash addresses with addition Jussi Maki
2009-08-10 4:52 ` David Miller
2009-08-13 2:06 ` Herbert Xu
2009-08-13 3:42 ` David Miller [this message]
2009-08-13 3:53 ` Herbert Xu
2009-08-13 3:56 ` David Miller
2009-08-13 4:11 ` Herbert Xu
2009-08-13 4:18 ` David Miller
2009-08-13 4:19 ` Herbert Xu
2009-08-06 17:40 ` [PATCH] xfrm: xfrm hash to use Jenkins' hash David Miller
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=20090812.204247.183387787.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=joamaki@gmail.com \
--cc=netdev@vger.kernel.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