mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
Fix "net: ipv4: do not handle duplicate fragments as overlapping"
ade446403b("net: ipv4: do not handle duplicate fragments as overlapping") was backported to many stable trees, but it had a problem that was "accidentally" fixed by the upstream commit0ff89efb52("ip: fail fast on IP defrag errors") This is the fixup for that problem as we do not want the larger patch in the older stable trees. Fixes:ade446403b("net: ipv4: do not handle duplicate fragments as overlapping") Reported-by: Ivan Babrou <ivan@cloudflare.com> Reported-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Chris
parent
1a2a4571f1
commit
d75638f662
@@ -423,6 +423,7 @@ static int ip_frag_queue(struct ipq *qp, struct sk_buff *skb)
|
||||
* fragment.
|
||||
*/
|
||||
|
||||
err = -EINVAL;
|
||||
/* Find out where to put this fragment. */
|
||||
prev_tail = qp->q.fragments_tail;
|
||||
if (!prev_tail)
|
||||
@@ -499,7 +500,6 @@ static int ip_frag_queue(struct ipq *qp, struct sk_buff *skb)
|
||||
|
||||
discard_qp:
|
||||
inet_frag_kill(&qp->q);
|
||||
err = -EINVAL;
|
||||
__IP_INC_STATS(net, IPSTATS_MIB_REASM_OVERLAPS);
|
||||
err:
|
||||
kfree_skb(skb);
|
||||
|
||||
Reference in New Issue
Block a user