This set of tests focuses on the handling of SYN-FIN-segments in the TIME-WAIT
state.
RFC 0793 requires the sending of
a RST-segment in response to a received SYN-segment with
RCV.NXT <= SEG.SEQ < RCV.NXT+RCV.WND
.
If SEG.SEQ of the received SYN-segment is outside this window, a challenge ACK
has to be sent.
For mitigating blind attacks, RFC 5961 requires that a challenge ACK has always to be sent in response to a SYN-segment.
In FreeBSD, the sysctl
-variable net.inet.tcp.insecure_syn
can be used to
select if procedures described in RFC 0793 or
RFC 5961 are followed.
The default is to follow RFC 5961.
FreeBSD currently implements a different strategy:
If a SYN-segment is received with SEG.SEQ <= RCV.NXT
, no response is sent and
the TCP connection stays in the TIME-WAIT
state.
However, if SEG.SEQ > RCV.NXT
holds, the TCP connection is moved from the
TIME-WAIT
state to the CLOSED
state and the incoming SYN-segment is processed.
In FreeBSD, the sysctl
-variable net.inet.tcp.drop_synfin
can be used to control
whether SYN-FIN segments should be dropped or not.
- If
SEG.SEQ <= RCV.NXT
, no response is sent and the TCP connection stays in theTIME-WAIT
state. - If
SEG.SEQ > RCV.NXT
, a SYN-ACK segment is sent and the TCP connection moves to theSYN-RCVD
state. - The state was moved from
TIME-WAIT
toCLOSED
, because thedrop_synfin
sysctl
-variable was not honored. This is fixed in f8b5681094dd752604bfa0603ba0be2873698f46 (D36862).