Page MenuHomeFreeBSD

tcp: The rack stack can incorrectly have an overflow when calculating a burst delay.
ClosedPublic

Authored by rrs on Oct 26 2021, 11:47 AM.
Tags
None
Referenced Files
F163234400: D32668.id97482.diff
Tue, Jul 21, 7:17 AM
F163213081: D32668.id.diff
Tue, Jul 21, 2:53 AM
Unknown Object (File)
Wed, Jul 8, 12:12 AM
Unknown Object (File)
Sat, Jul 4, 8:17 AM
Unknown Object (File)
Jun 9 2026, 5:40 AM
Unknown Object (File)
Jun 7 2026, 7:58 AM
Unknown Object (File)
May 25 2026, 9:05 AM
Unknown Object (File)
May 18 2026, 6:51 AM
Subscribers

Details

Summary

If the congestion window is very large the fact that we multiply it by 1000 (for microseconds) can
cause the uint32_t to overflow and we incorrectly calculate a very small divisor. This will then
cause the burst timer to be very large when it should be 0. Instead lets make the three variables
uint64_t and avoid the issue.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

rrs requested review of this revision.Oct 26 2021, 11:47 AM

While where at it, there is a duplicate srtt that should be just one var at the higher scope. Lets fix
that and make the needed casts when comparing to slot. That way we never can get a
confused compiler :)

This revision is now accepted and ready to land.Oct 26 2021, 3:37 PM