[PATCH net-next] tcp: accept RST if SEQ matches right edge of right-most SACK block

2016-06-07 Thread Pau Espin Pedrol
his patch was tested in a 3.18 kernel and probed to improve the situation in the scenario described above. Signed-off-by: Pau Espin Pedrol --- net/ipv4/tcp_input.c | 26 +++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_

[PATCH net-next] tcp: accept RST if SEQ matches right edge of right-most SACK block

2016-06-06 Thread Pau Espin Pedrol
his patch was tested in a 3.18 kernel and probed to improve the situation in the scenario described above. Signed-off-by: Pau Espin Pedrol --- net/ipv4/tcp_input.c | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_

Re: [PATCH net-next] tcp: accept RST if SEQ matches right edge of SACK block

2016-06-03 Thread Pau Espin
right-most edge of the right-most SACK. > But allowing a RST to match a sequence of some SACK in the middle of > the sequence range would seem to only increase the attack surface for > RST attacks. > > neal -- Pau Espin Pedrol | R&D Engineer - External pau.es...@tessares.net | +

[PATCH net-next] tcp: accept RST if SEQ matches right edge of SACK block

2016-06-03 Thread Pau Espin Pedrol
usually the ones with bigger probability to receive a RST as next packet. This should make it still difficult for attackers to inject a valid RST message. This patch was tested in a 3.18 kernel and probed to improve the situation in the scenario described above. Signed-off-by: Pau Espin Pedrol

Re: [PATCH net-next] tcp: accept RST if SEQ matches right edge of SACK block

2016-06-03 Thread Pau Espin
? On Wed, Jun 1, 2016 at 5:48 PM, Eric Dumazet wrote: > On Tue, 2016-05-31 at 13:38 +0200, Pau Espin Pedrol wrote: >> RFC 5961 advises to only accept RST packets containing a seq number >> matching the next expected seq number instead of the whole receive >> window in order to a

Re: [PATCH net-next] tcp: accept RST if SEQ matches right edge of SACK block

2016-06-02 Thread Pau Espin
iver to improve the situation in any case, and also do further > > work to improve the situation in the sender. > > > > All that being said, it's OK for me to add a sysctl to configure it. > > More opinions on whether it's needed or not for the patch are welcome. >

Re: [PATCH net-next] tcp: accept RST if SEQ matches right edge of SACK block

2016-06-02 Thread Pau Espin
:19 AM, Pau Espin wrote: > > Hi, first of all, here you can find the packetdrill test I created to > show up the scenario in which SACK is used and the RST is answered > with a challenge_ack. You will find below too some answers to some > previous comments. > > 0 socket(..., SO

Re: [PATCH net-next] tcp: accept RST if SEQ matches right edge of SACK block

2016-06-01 Thread Pau Espin
hat would mean when a RST is > received, up to 4-5 SEQs are checked to match instead of 1. > > I didn't contact the authors of the RFC. I CC them in this e-mail. I > hope that's the right thing to do in this case and that they don't > mind it in case they want to

Re: [PATCH net-next] tcp: accept RST if SEQ matches right edge of SACK block

2016-05-31 Thread Pau Espin
hey don't mind it in case they want to follow the topic. I will have a look at packetdrill to try to reproduce it somehow there. On Tue, May 31, 2016 at 5:12 PM, Eric Dumazet wrote: > On Tue, 2016-05-31 at 13:38 +0200, Pau Espin Pedrol wrote: >> RFC 5961 advises to only accept RST pa

[PATCH net-next] tcp: accept RST if SEQ matches right edge of SACK block

2016-05-31 Thread Pau Espin Pedrol
o inject a valid RST message. This patch was tested in a 3.18 kernel and probed to improve the situation in the scenario described above. Signed-off-by: Pau Espin Pedrol --- net/ipv4/tcp_input.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/net/ipv4/tcp_i