Re: [PATCH net] net: avoid sk_forward_alloc overflows

2016-09-17 Thread David Miller
From: Eric Dumazet Date: Thu, 15 Sep 2016 08:48:46 -0700 > From: Eric Dumazet > > A malicious TCP receiver, sending SACK, can force the sender to split > skbs in write queue and increase its memory usage. > > Then, when socket is closed and its write queue purged, we might > overflow sk_forwar

[PATCH net] net: avoid sk_forward_alloc overflows

2016-09-15 Thread Eric Dumazet
From: Eric Dumazet A malicious TCP receiver, sending SACK, can force the sender to split skbs in write queue and increase its memory usage. Then, when socket is closed and its write queue purged, we might overflow sk_forward_alloc (It becomes negative) sk_mem_reclaim() does nothing in this case