git: abcf615834dd - stable/13 - sctp: fix handling of RTO.initial of 1 ms

Michael Tuexen tuexen at FreeBSD.org
Sun Jun 6 23:25:15 UTC 2021


The branch stable/13 has been updated by tuexen:

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

commit abcf615834dd85c34eaa42e895d7a31dba5adedf
Author:     Michael Tuexen <tuexen at FreeBSD.org>
AuthorDate: 2021-03-22 15:40:41 +0000
Commit:     Michael Tuexen <tuexen at FreeBSD.org>
CommitDate: 2021-06-02 21:36:40 +0000

    sctp: fix handling of RTO.initial of 1 ms
    
    Reported by:    syzbot+5eb0e009147050056ce9 at syzkaller.appspotmail.com
    
    (cherry picked from commit d995cc7e5431873b839269fe22577acfa3b157bd)
---
 sys/netinet/sctputil.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c
index 7ddb4c3710df..5d4b3347a2c9 100644
--- a/sys/netinet/sctputil.c
+++ b/sys/netinet/sctputil.c
@@ -2277,7 +2277,9 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb,
 		}
 		rndval = sctp_select_initial_TSN(&inp->sctp_ep);
 		jitter = rndval % to_ticks;
-		to_ticks >>= 1;
+		if (to_ticks > 1) {
+			to_ticks >>= 1;
+		}
 		if (jitter < (UINT32_MAX - to_ticks)) {
 			to_ticks += jitter;
 		} else {


More information about the dev-commits-src-all mailing list