aboutsummaryrefslogtreecommitdiff
path: root/scripts/patch-kernel
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2018-07-27 12:27:07 +0200
committerMoyster <oysterized@gmail.com>2018-11-27 12:48:00 +0100
commit406a9a01c1fab916894abb4a772103e51c6a6551 (patch)
tree71d8cd894167cf066dbe7a75aa5a756dd58338ba /scripts/patch-kernel
parent827be32ec5bd49d3f8386b87c247d5685eadaa25 (diff)
UPSTREAM: tcp: detect malicious patterns in tcp_collapse_ofo_queue()
[ Upstream commit 3d4bf93ac12003f9b8e1e2de37fe27983deebdcf ] In case an attacker feeds tiny packets completely out of order, tcp_collapse_ofo_queue() might scan the whole rb-tree, performing expensive copies, but not changing socket memory usage at all. 1) Do not attempt to collapse tiny skbs. 2) Add logic to exit early when too many tiny skbs are detected. We prefer not doing aggressive collapsing (which copies packets) for pathological flows, and revert to tcp_prune_ofo_queue() which will be less expensive. In the future, we might add the possibility of terminating flows that are proven to be malicious. Change-Id: I635a058ea387b224d1d0ac7653cc4dfc0aadab3a Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Soheil Hassas Yeganeh <soheil@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/patch-kernel')
0 files changed, 0 insertions, 0 deletions