From: Matthieu Baerts <matttbe@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>, netdev@vger.kernel.org
Cc: Mat Martineau <martineau@kernel.org>,
Geliang Tang <geliang@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Simon Horman <horms@kernel.org>,
mptcp@lists.linux.dev, stable@vger.kernel.org
Subject: Re: [PATCH net] mptcp: fix TCP options overflow.
Date: Sat, 21 Dec 2024 11:28:26 +0100 [thread overview]
Message-ID: <047cb3ef-f0c0-43e4-82e9-dc0073c8b953@kernel.org> (raw)
In-Reply-To: <025d9df8cde3c9a557befc47e9bc08fbbe3476e5.1734771049.git.pabeni@redhat.com>
Hi Paolo,
On 21/12/2024 09:51, Paolo Abeni wrote:
> Syzbot reported the following splat:
(...)
> Eric noted a probable shinfo->nr_frags corruption, which indeed
> occurs.
>
> The root cause is a buggy MPTCP option len computation in some
> circumstances: the ADD_ADDR option should be mutually exclusive
> with DSS since the blamed commit.
>
> Still, mptcp_established_options_add_addr() tries to set the
> relevant info in mptcp_out_options, if the remaining space is
> large enough even when DSS is present.
>
> Since the ADD_ADDR infos and the DSS share the same union
> fields, adding first corrupts the latter. In the worst-case
> scenario, such corruption increases the DSS binary layout,
> exceeding the computed length and possibly overwriting the
> skb shared info.
>
> Address the issue by enforcing mutual exclusion in
> mptcp_established_options_add_addr(), too.
Thank you for the investigation and the fix, it looks good to me:
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> Reported-by: syzbot+38a095a81f30d82884c1@syzkaller.appspotmail.com
If you don't mind, can you please add these two tags when applying the
patches to help to track the backports?
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/538
Cc: stable@vger.kernel.org
> Fixes: 1bff1e43a30e ("mptcp: optimize out option generation")
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2024-12-21 10:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-21 8:51 [PATCH net] mptcp: fix TCP options overflow Paolo Abeni
2024-12-21 10:28 ` Matthieu Baerts [this message]
2024-12-23 9:46 ` Eric Dumazet
2024-12-21 10:33 ` MPTCP CI
2024-12-31 2:00 ` patchwork-bot+netdevbpf
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=047cb3ef-f0c0-43e4-82e9-dc0073c8b953@kernel.org \
--to=matttbe@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--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=stable@vger.kernel.org \
/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