Page MenuHomeFreeBSD

sockets: bump socket buffer limit
ClosedPublic

Authored by tuexen on Oct 2 2025, 7:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 10, 8:28 PM
Unknown Object (File)
Fri, Nov 7, 2:11 AM
Unknown Object (File)
Fri, Oct 31, 3:15 PM
Unknown Object (File)
Wed, Oct 29, 7:52 AM
Unknown Object (File)
Wed, Oct 29, 7:49 AM
Unknown Object (File)
Wed, Oct 29, 7:49 AM
Unknown Object (File)
Wed, Oct 29, 7:35 AM
Unknown Object (File)
Tue, Oct 28, 3:18 AM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tuexen requested review of this revision.Oct 2 2025, 7:58 PM
jtl added a subscriber: jtl.

My main concern about these three revisions is that they are somewhat susceptible of remote manipulation, and that could make it easier to DoS a server. However, I view that as a tradeoff that the user needs to make, and think an appropriate release note should suffice to warn about these issues.

This revision is now accepted and ready to land.Oct 2 2025, 9:19 PM
In D52873#1207907, @jtl wrote:

My main concern about these three revisions is that they are somewhat susceptible of remote manipulation, and that could make it easier to DoS a server. However, I view that as a tradeoff that the user needs to make, and think an appropriate release note should suffice to warn about these issues.

I raised the same concerns on all the discussions we had on that on the transport call. We still decided to proceed with the change, to match modern network speeds and other OSes.

The rationale is that we aren't raising the default socket size, but the maximum it can autoscale to. So, for attacker to succeed, they need to have a very good connection to the victim and work a little bit on growing the window on every separate connection [1]. However, those connection share the bandwidth. This makes attack even more difficult. I never heard of such attacks in the wild. If attacker owns a large distributed botnet of poorly performing bots (a usual case), of course attacking the default buffer is the way to go.

[1] I have a patch in queue that enables bandwidth products to be used from TCP hostcache. It has been tested by our team, but awaits TCP team approval for over a year already. Combination of these two changes will make us more vulnerable to this kind of attack - attacker will need not work on the window for every connection.

This all together calls for a mechanism to shrink a buffer that has once grown. We have agreement with lstewart@ that this needs to be done, just ENOTIME.

This revision was automatically updated to reflect the committed changes.