From: Hannes Frederic Sowa <hannes@redhat.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>,
netdev <netdev@vger.kernel.org>,
Jeffrey Knockel <jeffk@cs.unm.edu>,
"Jedidiah R. Crandall" <crandall@cs.unm.edu>,
Linus Torvalds <torvalds@linux-foundation.org>,
Willy Tarreau <w@1wt.eu>,
security@kernel.org
Subject: Re: [PATCH v2 net] ip: make IP identifiers less predictable
Date: Sat, 26 Jul 2014 00:35:52 +0200 [thread overview]
Message-ID: <1406327752.14815.8.camel@localhost> (raw)
In-Reply-To: <1406317840.3363.106.camel@edumazet-glaptop2.roam.corp.google.com>
On Fr, 2014-07-25 at 21:50 +0200, Eric Dumazet wrote:
> diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
> index cb9df0eb4023..73372e8016b9 100644
> --- a/net/ipv6/ip6_output.c
> +++ b/net/ipv6/ip6_output.c
> @@ -545,6 +545,7 @@ static void ipv6_select_ident(struct frag_hdr *fhdr, struct rt6_info *rt)
> net_get_random_once(&ip6_idents_hashrnd, sizeof(ip6_idents_hashrnd));
>
> hash = __ipv6_addr_jhash(&rt->rt6i_dst.addr, ip6_idents_hashrnd);
> + hash ^= __ipv6_addr_jhash(&rt->rt6i_src.addr, fhdr->nexthdr);
I am not sure if we should hash fhdr->nexthdr for IPv6.
If you look at the reassembly engine, we compare protocol value for IPv4
but not for IPv6 (we even don't save it).
Even if we only transmit packets with UDP protocol type we might end up
having an extension header right after the fragmentation header of
another type later in the flow. We can end up using a different bucket
and thus reusing a fragmentation id wich has been seen before in this
flow possibly resulting in reassembly issues.
I don't see such a problem for IPv4.
Otherwise very nice patch, thanks,
Hannes
next prev parent reply other threads:[~2014-07-25 22:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-24 8:07 [PATCH net] ip: make IP identifiers less predictable Eric Dumazet
2014-07-24 18:21 ` Linus Torvalds
2014-07-25 15:55 ` Jeffrey Knockel
2014-07-25 18:09 ` Eric Dumazet
2014-07-25 18:35 ` Linus Torvalds
2014-07-25 18:38 ` Eric Dumazet
2014-07-25 19:03 ` Willy Tarreau
2014-07-25 23:05 ` Hannes Frederic Sowa
2014-07-25 20:28 ` Jeffrey Knockel
2014-07-25 19:50 ` [PATCH v2 " Eric Dumazet
2014-07-25 19:54 ` Eric Dumazet
2014-07-25 19:57 ` Eric Dumazet
2014-07-25 22:35 ` Hannes Frederic Sowa [this message]
2014-07-26 6:51 ` Eric Dumazet
2014-07-26 12:21 ` Hannes Frederic Sowa
2014-07-26 6:58 ` [PATCH v3 " Eric Dumazet
2014-07-29 1:47 ` 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=1406327752.14815.8.camel@localhost \
--to=hannes@redhat.com \
--cc=crandall@cs.unm.edu \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=jeffk@cs.unm.edu \
--cc=netdev@vger.kernel.org \
--cc=security@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=w@1wt.eu \
/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;
as well as URLs for NNTP newsgroup(s).