Commit 11554a2d authored by Takashi Iwai's avatar Takashi Iwai Committed by Kleber Sacilotto de Souza

tcp: Fix missing range_truesize enlargement in the backport

BugLink: https://bugs.launchpad.net/bugs/1792310

The 4.4.y stable backport dc6ae4df for the upstream commit
3d4bf93a ("tcp: detect malicious patterns in
tcp_collapse_ofo_queue()") missed a line that enlarges the
range_truesize value, which broke the whole check.

Fixes: dc6ae4df ("tcp: detect malicious patterns in tcp_collapse_ofo_queue()")
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Cc: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent b0f51542
......@@ -4830,8 +4830,9 @@ 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;
range_truesize = skb->truesize;
} else {
range_truesize += skb->truesize;
if (before(TCP_SKB_CB(skb)->seq, start))
start = TCP_SKB_CB(skb)->seq;
if (after(TCP_SKB_CB(skb)->end_seq, end))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment