Netdev List
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Shawn Shao <shawnq1@163.com>
Cc: martineau@kernel.org, geliang@kernel.org, davem@davemloft.net,
	edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
	willemb@google.com, horms@kernel.org, netdev@vger.kernel.org,
	mptcp@lists.linux.dev
Subject: Re: [PATCH] mptcp: reject negative MPTCP_INFO lengths
Date: Sat, 5 Dec 2026 07:48:56 +0100	[thread overview]
Message-ID: <21421b87-d0b5-4e84-abf6-4306fc38de7a@kernel.org> (raw)
In-Reply-To: <20261205054241.2964578-1-shawnq1@163.com>

Hi Shawn,

05 Dec 2026 06:43:09 Shawn Shao <shawnq1@163.com>:

>
> mptcp_getsockopt_info() reads optlen as a signed int but converts it to
> unsigned int in min_t(). A negative value therefore selects the full
> MPTCP_INFO structure instead of being rejected.
>
> Reject negative lengths before the zero-length check and unsigned
> conversion.

Thanks!

Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>

While at it:

Cc: stable@vger.kernel.org

Cheers,
Matt

      parent reply	other threads:[~2026-12-05  6:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-05  5:42 [PATCH] mptcp: reject negative MPTCP_INFO lengths Shawn Shao
2026-12-05  5:48 ` netdev-bot+sinfo
2026-12-05  6:48 ` Matthieu Baerts [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21421b87-d0b5-4e84-abf6-4306fc38de7a@kernel.org \
    --to=matttbe@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=geliang@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=martineau@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shawnq1@163.com \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox