[PATCH net] sctp: sm_statefuns: Fix zero window detection in T3 timeout handling

From: luoqing

Date: Thu Jul 30 2026 - 02:40:50 EST


From: Qing Luo <luoqing@xxxxxxxxxx>

In sctp_sf_do_6_3_3_rtx(), the zero window detection was overly
restrictive, only starting the T5 shutdown guard timer when the
association was in SHUTDOWN_PENDING state. This caused premature
ABORTs when the receiver's rwnd was closed but the association was
still in ESTABLISHED state.

According to RFC 2960 Section 6.1, zero window probing is a normal
protocol behavior. When rwnd is 0, the sender can always have one
DATA chunk in flight to probe for a change in rwnd. Therefore, we
should give the receiver a chance to recover by starting the T5
timer regardless of the association's current state.

Fix this by removing the SHUTDOWN_PENDING state check, so that the
T5 timer is started whenever zero_window_announced is true.

Fixes: 8a0d19c5ed41 ("sctp: start t5 timer only when peer rwnd is 0 and local state is SHUTDOWN_PENDING")
Assisted-by: LLM # review
Signed-off-by: Qing Luo <luoqing@xxxxxxxxxx>
---
net/sctp/sm_statefuns.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 708fa07d5fff..b01db33bbc36 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -5842,8 +5842,7 @@ enum sctp_disposition sctp_sf_do_6_3_3_rtx(struct net *net,
SCTP_INC_STATS(net, SCTP_MIB_T3_RTX_EXPIREDS);

if (asoc->overall_error_count >= asoc->max_retrans) {
- if (asoc->peer.zero_window_announced &&
- asoc->state == SCTP_STATE_SHUTDOWN_PENDING) {
+ if (asoc->peer.zero_window_announced) {
/*
* We are here likely because the receiver had its rwnd
* closed for a while and we have not been able to
--
2.25.1