diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-27 13:58:53 +0200 |
---|---|---|
committer | Shirle Yuen <shirleyshukyee@google.com> | 2018-08-27 14:35:26 -0700 |
commit | 83c65cd436718667e87e61d235f88c073ffd20f7 (patch) | |
tree | 313ee7a92721b989d17ab936de376fc95d1df4ad | |
parent | 820042b195245ea29089596a37d3725089f7ca06 (diff) | |
download | v4.4-android-o-mr1-iot-release-smart-display-r30.tar.gz |
Fix backport of "tcp: detect malicious patterns in tcp_collapse_ofo_queue()"android-o-mr1-iot-release-smart-display-r9android-o-mr1-iot-release-smart-display-r8android-o-mr1-iot-release-smart-display-r5android-o-mr1-iot-release-smart-display-r40.1Jandroid-o-mr1-iot-release-smart-display-r39android-o-mr1-iot-release-smart-display-r30android-o-mr1-iot-release-smart-display-r22android-o-mr1-iot-release-smart-display-r14android-o-mr1-iot-release-smart-clock-r6android-o-mr1-iot-release-smart-clock-r2android-o-mr1-iot-release-smart-clock-fsiandroid-o-mr1-iot-release-smart-clock-fcsandroid-o-mr1-iot-release-cube_r2android-o-mr1-iot-release-cube-fsiandroid-o-mr1-iot-release-cube-fcs
Based on review from Eric Dumazet, my backport of commit
3d4bf93ac12003f9b8e1e2de37fe27983deebdcf to older kernels was a bit
incorrect. This patch fixes this.
Reported-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
(cherry picked from commit 7a77ef209cfb4e760c70e56bc5fdeaed8f34ed45)
-rw-r--r-- | net/ipv4/tcp_input.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index f166525fac88..c5fa41a8d1cd 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -4822,6 +4822,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; |