Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Jan 2025 18:47:20 GMT
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 88766e7af52b - main - TCP BBR: fix integer overflow
Message-ID:  <202501031847.503IlKlR097238@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=88766e7af52bbde32b14ad48fb76798a3ba4650c

commit 88766e7af52bbde32b14ad48fb76798a3ba4650c
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2025-01-03 18:44:43 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2025-01-03 18:44:43 +0000

    TCP BBR: fix integer overflow
    
    Use 64-bit arithmetic.
    
    Reviewed by:            rrs
    CID:                    1523806
    MFC after:              1 week
    Sponsored by:           Netflix, Inc.
    Differential Revision:  https://reviews.freebsd.org/D48302
---
 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 fd5bcd81f25e..9e1f83df4298 100644
--- a/sys/netinet/tcp_stacks/bbr.c
+++ b/sys/netinet/tcp_stacks/bbr.c
@@ -3843,7 +3843,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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202501031847.503IlKlR097238>