aboutsummaryrefslogtreecommitdiff
path: root/scripts/basic
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2018-07-27 12:27:06 +0200
committerMoyster <oysterized@gmail.com>2018-11-27 12:47:40 +0100
commit827be32ec5bd49d3f8386b87c247d5685eadaa25 (patch)
tree059179d61b5f3c6eca52fb907e46509e8c4e40fa /scripts/basic
parent34deb726a9f5ff2fe9d1ec7adc667a8f45924f79 (diff)
UPSTREAM: tcp: avoid collapses in tcp_prune_queue() if possible
[ Upstream commit f4a3313d8e2ca9fd8d8f45e40a2903ba782607e7 ] Right after a TCP flow is created, receiving tiny out of order packets allways hit the condition : if (atomic_read(&sk->sk_rmem_alloc) >= sk->sk_rcvbuf) tcp_clamp_window(sk); tcp_clamp_window() increases sk_rcvbuf to match sk_rmem_alloc (guarded by tcp_rmem[2]) Calling tcp_collapse_ofo_queue() in this case is not useful, and offers a O(N^2) surface attack to malicious peers. Better not attempt anything before full queue capacity is reached, forcing attacker to spend lots of resource and allow us to more easily detect the abuse. Change-Id: Ib4fabbd6f22b51fd6eea66a0f3b210543d3ebe01 Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Soheil Hassas Yeganeh <soheil@google.com> Acked-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Signed-off-by: Chenbo Feng <fengc@google.com>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions