[PATCH stable 4.4 5/9] tcp: free batches of packets in tcp_prune_ofo_queue()

2018-08-15 Thread Mao Wenan
From: Eric Dumazet [ Upstream commit 72cd43ba64fc172a443410ce01645895850844c8 ] 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. out_of_ord

Re: [PATCH stable 4.4 5/9] tcp: free batches of packets in tcp_prune_ofo_queue()

2018-08-15 Thread Greg KH
On Wed, Aug 15, 2018 at 09:21:04PM +0800, Mao Wenan wrote: > From: 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. o

[PATCH stable 4.4 5/9] tcp: free batches of packets in tcp_prune_ofo_queue()

2018-08-15 Thread Mao Wenan
From: 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. out_of_order_queue rb-tree can contain thousands of nodes, iterating ove