git: c178bc193490 - stable/14 - TCP BBR: fix integer overflow
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 05 Feb 2025 20:46:14 UTC
The branch stable/14 has been updated by tuexen:
URL: https://cgit.FreeBSD.org/src/commit/?id=c178bc1934901cf825c813bed2f3559c4e35dff7
commit c178bc1934901cf825c813bed2f3559c4e35dff7
Author: Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2025-01-03 18:44:43 +0000
Commit: Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2025-02-05 09:46:22 +0000
TCP BBR: fix integer overflow
Use 64-bit arithmetic.
Reviewed by: rrs
CID: 1523806
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D48302
(cherry picked from commit 88766e7af52bbde32b14ad48fb76798a3ba4650c)
---
sys/netinet/tcp_stacks/bbr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c
index 762fb53fcdd7..1d030230748f 100644
--- a/sys/netinet/tcp_stacks/bbr.c
+++ b/sys/netinet/tcp_stacks/bbr.c
@@ -3842,7 +3842,7 @@ bbr_post_recovery(struct tcpcb *tp)
else if (bbr->r_ctl.rc_delivered == 0)
lr2use = 1000;
else {
- lr2use = bbr->r_ctl.rc_lost * 1000;
+ lr2use = (uint64_t)bbr->r_ctl.rc_lost * (uint64_t)1000;
lr2use /= bbr->r_ctl.rc_delivered;
}
lr2use += bbr->r_ctl.recovery_lr;