Skip to content

Disable reuse of TIME_WAIT sockets - #335

Merged
adrelanos merged 1 commit into
Kicksecure:masterfrom
raja-grewal:stop_tw_reuse
Dec 3, 2025
Merged

adrelanos merged 1 commit into
Kicksecure:masterfrom
raja-grewal:stop_tw_reuse

Conversation

@raja-grewal

Copy link
Copy Markdown
Contributor

This pull request disable reuse of TIME_WAIT sockets for new outgoing connections as the safety of this feature is reliant on TCP timestamps which we have disabled.

TCP timestamps have been disabled since 01/04/2016 as per #1, that is, the very first pull request or issue on GitHub.

Note that this setting currently defaults to net.ipv4.tcp_tw_reuse=2 which permits reuse only for loopback connections. This is still broken as there are no associated timestamps to ensure the new connection is not a duplicate segment from an older connection.

Changes

Set sysctl net.ipv4.tcp_tw_reuse=0 setting.

Mandatory Checklist

  • Legal agreements accepted. By contributing to this organisation, you acknowledge you have read, understood, and agree to be bound by these these agreements:

Terms of Service, Privacy Policy, Cookie Policy, E-Sign Consent, DMCA, Imprint

Optional Checklist

The following items are optional but might be requested in certain cases.

  • I have tested it locally
  • I have reviewed and updated any documentation if relevant
  • I am providing new code and test(s) for it

@ArrayBolt3

Copy link
Copy Markdown
Contributor

Looks good to me, merged into my arraybolt3/trixie branch.

@adrelanos
adrelanos merged commit 84e193c into Kicksecure:master Dec 3, 2025
@raja-grewal
raja-grewal deleted the stop_tw_reuse branch December 11, 2025 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants