Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0874564 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Greg Kroah-Hartman
Browse files

Fix backport of "tcp: detect malicious patterns in tcp_collapse_ofo_queue()"



Based on review from Eric Dumazet, my backport of commit
3d4bf93ac12003f9b8e1e2de37fe27983deebdcf to older kernels was a bit
incorrect.  This patch fixes this.

Reported-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent b0519734
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4686,6 +4686,7 @@ static void tcp_collapse_ofo_queue(struct sock *sk)
			/* Start new segment */
			start = TCP_SKB_CB(skb)->seq;
			end = TCP_SKB_CB(skb)->end_seq;
			range_truesize = skb->truesize;
		} else {
			if (before(TCP_SKB_CB(skb)->seq, start))
				start = TCP_SKB_CB(skb)->seq;