lkml.org 
[lkml]   [2018]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net v2] net: ipv4: do not handle duplicate fragments as overlapping
From
From: Michal Kubecek <mkubecek@suse.cz>
Date: Thu, 13 Dec 2018 17:23:32 +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. For similar reason, linear list ("run") of a rbtree node is not
> iterated, we only check if the new fragment is a subset of the interval
> covered by existing consecutive fragments.
>
> Fixes: 7969e5c40dfd ("ip: discard IPv4 datagrams with overlapping segments.")
> Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
>
> v2: instead of an exact check iterating through linear list of an rbtree
> node, only check if the new fragment is subset of the "run" (suggested
> by Eric Dumazet)

Applied and queued up for -stable, thank you.

\
 
 \ /
  Last update: 2018-12-15 20:55    [W:0.084 / U:19.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site