Re: [PATCH net-next] tcp: Check space before adding MPTCP options

From: Eric Dumazet
Date: Wed Dec 04 2024 - 02:35:25 EST


On Wed, Dec 4, 2024 at 5:07 AM MoYuanhao <moyuanhao3676@xxxxxxx> wrote:
>
> Ensure enough space before adding MPTCP options in tcp_syn_options()
> Added a check to verify sufficient remaining space
> before inserting MPTCP options in SYN packets.
> This prevents issues when space is insufficient.
>
> Signed-off-by: MoYuanhao <moyuanhao3676@xxxxxxx>
> ---

If this is happening, then this would be a bug, and a Fixes: tag would
be needed.

If this is not yet happening, but would happen in the future, this
patch would hide a bug.

You forgot to CC MPTCP maintainers and reviewers ?

Matthieu Baerts <matttbe@xxxxxxxxxx> (maintainer:NETWORKING [MPTCP])
Mat Martineau <martineau@xxxxxxxxxx> (maintainer:NETWORKING [MPTCP])
Geliang Tang <geliang@xxxxxxxxxx> (reviewer:NETWORKING [MPTCP])

In my opinion, we should pass @remaining to mptcp_syn_options()
arguments to avoid side effects.