This set of tests focuses on the handling of RST-segments in the LAST-ACK
state.
RFC 0793 requires RST-segments to be accepted if and only if
RCV.NXT <= SEG.SEQ < RCV.NXT+RCV.WND
holds.
For mitigating blind attacks, RFC 5961
requires the RST-segments only to be accepted if and only if RCV.NXT = SEG.SEQ
holds.
In case of RCV.NXT < SEG.SEQ < RCV.NXT+RCV.WND
, a challenge ACK has to be sent.
In FreeBSD, the sysctl
-variable net.inet.tcp.insecure_rst
can be used to
select if procedures described in RFC 0793 or
RFC 5961 are followed.
The default is to follow RFC 5961.
- In
CLOSING
orLAST-ACK
state after receipt of an acceptable RST-segment theSO_ERROR
socket options returns 0 instead ofECONNRESET
(the same works inCLOSE-WAIT
). TCP/IP Illustrated, page 964, states that no error is signalled to the process, "since the process has closed the socket". This argument coversCLOSING
,LAST-ACK
, andTIME-WAIT
. However, the state can be reached by callingshutdown(..., SHUT_WR)
and therefore the appication can still be notified inCLOSING
andLAST-ACK
state. Fixed in r308745 (D8371).