Re: [PATCH net v6] net: ipv4: add zero check for snd_cwnd_clamp

From: Eric Dumazet

Date: Tue Oct 27 2026 - 05:22:24 EST


Le jeu. 22 oct. 2026 à 01:58, Kaho Jiang <kj2864@xxxxxxx> a écrit :
>
> When RTAX_CWND is locked, user is able to pass 0 into it.
> This could lead to writing 0 to tp->snd_cwnd, leading to a
> division by zero error.
>
>

>
> Fix by checking if user pass in zero as parameter and if lock is present.
>
> Fixes: 814d488c6126 ("tcp: fix the timid additive increase on stretch ACKs")
> Cc: stable@xxxxxxxxxxxxxxx
> Suggested-by: Eric Dumazet <edumazet@xxxxxxxxxx>
> Reported-by: co+71b6509cb791e531@xxxxxxx
> Assisted-by: LLM
> Signed-off-by: Kaho Jiang <kj2864@xxxxxxx>

Reviewed-by: Eric Dumazet <edumazet@xxxxxxxxxx>