netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/5] tcp: more robust ooo handling
@ 2018-07-23 16:28 Eric Dumazet
  2018-07-23 16:28 ` [PATCH net 1/5] tcp: free batches of packets in tcp_prune_ofo_queue() Eric Dumazet
                   ` (5 more replies)
  0 siblings, 6 replies; 20+ messages in thread
From: Eric Dumazet @ 2018-07-23 16:28 UTC (permalink / raw)
  To: David S . Miller, Juha-Matti Tilli, Yuchung Cheng,
	Soheil Hassas Yeganeh
  Cc: netdev, Eric Dumazet, Eric Dumazet

Juha-Matti Tilli reported that malicious peers could inject tiny
packets in out_of_order_queue, forcing very expensive calls
to tcp_collapse_ofo_queue() and tcp_prune_ofo_queue() for
every incoming packet.

With tcp_rmem[2] default of 6MB, the ooo queue could
contain ~7000 nodes.

This patch series makes sure we cut cpu cycles enough to
render the attack not critical.

We might in the future go further, like disconnecting
or black-holing proven malicious flows.

Eric Dumazet (5):
  tcp: free batches of packets in tcp_prune_ofo_queue()
  tcp: avoid collapses in tcp_prune_queue() if possible
  tcp: detect malicious patterns in tcp_collapse_ofo_queue()
  tcp: call tcp_drop() from tcp_data_queue_ofo()
  tcp: add tcp_ooo_try_coalesce() helper

 net/ipv4/tcp_input.c | 62 +++++++++++++++++++++++++++++++++++---------
 1 file changed, 50 insertions(+), 12 deletions(-)

-- 
2.18.0.233.g985f88cf7e-goog

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2018-08-10 12:40 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-23 16:28 [PATCH net 0/5] tcp: more robust ooo handling Eric Dumazet
2018-07-23 16:28 ` [PATCH net 1/5] tcp: free batches of packets in tcp_prune_ofo_queue() Eric Dumazet
2018-07-23 16:28 ` [PATCH net 2/5] tcp: avoid collapses in tcp_prune_queue() if possible Eric Dumazet
2018-07-23 16:28 ` [PATCH net 3/5] tcp: detect malicious patterns in tcp_collapse_ofo_queue() Eric Dumazet
2018-07-23 16:28 ` [PATCH net 4/5] tcp: call tcp_drop() from tcp_data_queue_ofo() Eric Dumazet
2018-07-23 16:28 ` [PATCH net 5/5] tcp: add tcp_ooo_try_coalesce() helper Eric Dumazet
2018-07-23 19:03 ` [PATCH net 0/5] tcp: more robust ooo handling David Miller
2018-08-03 10:55   ` David Woodhouse
2018-08-03 23:53     ` David Miller
2018-08-04  7:05       ` Greg KH
2018-08-04  9:04         ` David Woodhouse
2018-08-04  9:10           ` [PATCH 4.9-stable] tcp: add tcp_ooo_try_coalesce() helper David Woodhouse
2018-08-07 13:22             ` Greg KH
2018-08-09 12:37               ` maowenan
2018-08-09 12:47                 ` Greg KH
2018-08-09 12:52                   ` David Woodhouse
2018-08-10  2:02                     ` maowenan
2018-08-10  6:26                     ` maowenan
2018-08-10 10:10                       ` maowenan
2018-08-10  1:56                   ` maowenan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).