[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181212.214223.211216727717464391.davem@davemloft.net>
Date: Wed, 12 Dec 2018 21:42:23 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: mkubecek@...e.cz
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
posk@...gle.com, eric.dumazet@...il.com, gfigueira@...e.com
Subject: Re: [PATCH net] net: ipv4: do not handle duplicate fragments as
overlapping
From: Michal Kubecek <mkubecek@...e.cz>
Date: Thu, 13 Dec 2018 03:28:00 +0100 (CET)
> Since commit 7969e5c40dfd ("ip: discard IPv4 datagrams with overlapping
> segments.") IPv4 reassembly code drops the whole queue whenever an
> overlapping fragment is received. However, the test is written in a way
> which detects duplicate fragments as overlapping so that in environments
> with many duplicate packets, fragmented packets may be undeliverable.
>
> Add an extra test and for (potentially) duplicate fragment, only drop the
> new fragment rather than the whole queue. Only starting offset and length
> are checked, not the contents of the fragments as that would be too
> expensive. Check for duplicity with last (tail) fragment first as in real
> life scenarios this should be the most frequent case and we would have to
> iterate through the whole "run" otherwise.
>
> Fixes: 7969e5c40dfd ("ip: discard IPv4 datagrams with overlapping segments.")
> Signed-off-by: Michal Kubecek <mkubecek@...e.cz>
I'll give Eric a chance to review this, thanks Michal.
Powered by blists - more mailing lists