Re: [PATCH net] net/rds: tcp: bound the message length announced by the peer
From: Wang, Weidong
Date: Sun Nov 15 2026 - 16:58:46 EST
On Sun, 15 Nov 2026, netdev-bot+sashiko@xxxxxxxxxx wrote:
> [Severity: Medium]
> After this check fires, tc->t_tinc is still set, with t_tinc_hdr_rem == 0
> and t_tinc_data_rem > RDS_MAX_MSG_SIZE. Won't every later call into
> rds_tcp_data_recv() hit the same check straight away and return 0 without
> consuming anything?
Yes, that is right. Once the check fires nothing more is consumed, so the
receive queue does not drain, the loop in rds_tcp_conn_path_shutdown()
runs all 50 rounds, and each round calls rds_conn_path_drop() again while
the path is DISCONNECTING.
v2 will drop the connection once, when the oversized header completes,
and then consume and discard the rest of the stream without cloning it,
so the drain loop can finish and the drop is not repeated.
> [Severity: High]
> This isn't a bug introduced by this patch, but the IB transport appears to
> have the same unbounded h_len problem.
I will look at the IB receive path separately. The v2 changelog will say
that the patch bounds only the TCP receive path.
Allison, since this changes the patch, I will leave your Reviewed-by
off v2; I would be glad if you could look at it again.
pw-bot: cr