Page MenuHomeFreeBSD

tcp: Don't allow SACK holes to cover the FIN sequence space.
Needs ReviewPublic

Authored by hselasky on Jun 16 2022, 10:47 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 2, 3:51 PM
Unknown Object (File)
Sun, Sep 21, 11:55 PM
Unknown Object (File)
Sep 9 2025, 2:01 PM
Unknown Object (File)
Jul 27 2025, 8:43 PM
Unknown Object (File)
Jul 4 2025, 12:39 AM
Unknown Object (File)
May 25 2025, 3:26 PM
Unknown Object (File)
Mar 27 2025, 12:21 AM
Unknown Object (File)
Feb 14 2025, 12:19 PM

Details

Reviewers
tuexen
rscheff
Group Reviewers
transport

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

What do you think. Is this possible?

Hmm... Note that this section of code covers the incoming SACK blocks. Those that indicate positive reception of the associated sequence number by the remote side.

While it is rather uncommon (never observed this in the wild) for a tcp stack to SACK the FIN bit, nothing in the RFCs prevents that from happening.

This change would effectively decline acknowleding any SACK block which also includes the FIN - and cause spurious retransmissions of already received data (unless there is a cummulative ack - again including the FIN - quickly enough).

IIRC, i did run testcases with incoming SACK block which only covered the final data (snd_max-1), as well as the FIN bit (snd_max).

This issue we are currently having is, that rarely, snd_max is incremented repeatedly (probably while resending the FIN bit). Logically, the sequence space doesn't look like {<SYN>[data]<FIN>} but {<SYN>[data]<FIN><FIN><FIN>} with the base stack. It appears that these multiple FINs in the sequence space have been a problem for some time, but prior to SACK rescue retransmissions, never showed up negatively unless someone had managed to capture such a very rare and fleeting session where that happens... And then it would only be a fluke in a packet capture without data consistency impact.