Re: [BUG] tcp: shift-out-of-bounds in inet_csk_rto_backoff() for an orphaned zero-window probe

From: Jiayuan Chen

Date: Wed Nov 18 2026 - 07:41:08 EST



On 11/18/26 8:12 PM, Eric Dumazet wrote:
> Le mer. 18 nov. 2026 à 11:59, Kyuwon Cho <kyuwoncho18@xxxxxxxxx> a écrit :
>> Hi Eric, Neal,
>>
>> While testing v7.4-rc3 with an LLM-guided test generator that we are
>> developing as a research prototype, we found that an orphaned socket
>> that keeps sending zero-window probes makes inet_csk_rto_backoff()
>> shift by 64 or more. An unprivileged user can set this up in its own
>> user and network namespace:
> Thanks for the report and the reproducer.
>
> This is a known issue, a fix is under review:
>
> [PATCH net v2 2/2] tcp: fix shift-out-of-bounds in inet_csk_rto_backoff()
> https://lore.kernel.org/netdev/20261026123244.239766-2-jiayuan.chen@xxxxxxxxx/
>
> It limits the shift to 32 in inet_csk_rto_backoff() itself, so it
> covers both callers: tcp_ld_RTO_revert(), which is where Jiayuan hit
> the splat, and the orphan check in tcp_probe_timer() from your report.
>
>> We found no earlier report of this call site.
> Searching lore for the function name would have found it:
>
> https://lore.kernel.org/netdev/?q=inet_csk_rto_backoff
>
> Please do this before sending a report, especially for findings
> coming from automated tools.
>
> Note that the netns sysctls are not needed. tcp_retransmit_timer()
> increments icsk_backoff without any limit, so TCP_USER_TIMEOUT and
> TCP_RTO_MAX_MS on a socket with a silent peer are enough to get
> icsk_backoff above 63, then an ICMP unreachable reaches the shift
> from tcp_ld_RTO_revert().
>
>> On x86 the shift count is masked, so from 64 on alive can come out true
>> again and the orphan keeps probing instead of being aborted.
> Right, and this starts before 64: with icsk_rto == 200, the u64
> is already zero when icsk_backoff reaches 61.
>
> Jiayuan, I have not seen a v3 addressing Neal's feedback.
>
> When you send it, could you please add:
>
> Reported-by: Kyuwon Cho <kyuwoncho18@xxxxxxxxx>
> Closes: https://lore.kernel.org/netdev/179499954853.1440581.6627074959099619480@xxxxxxxxx/
>
> and mention the zero window probe path in the changelog ?


Sure I can do that.

>
> Kyuwon, it would be nice if you could test Jiayuan's patch with your
> reproducer and send a Tested-by: tag in that thread.
>
> Thanks.