From: Matthieu Baerts <matttbe@kernel.org>
To: Kalpan Jani <kalpan.jani@mpiricsoftware.com>, mptcp@lists.linux.dev
Cc: martineau@kernel.org, pabeni@redhat.com, janak@mpiric.us,
shardul.b@mpiricsoftware.com, kalpanjani009@gmail.com,
shardulsb08@gmail.com
Subject: Re: [PATCH] mptcp: pm: don't WARN on re-announced addr in kernel PM
Date: Tue, 26 May 2026 18:39:26 +1000 [thread overview]
Message-ID: <07bf06c0-20dd-4e31-960a-b79f6fffcecc@kernel.org> (raw)
In-Reply-To: <20260525121911.2410171-1-kalpan.jani@mpiricsoftware.com>
Hi Kalpan,
On 25/05/2026 22:19, Kalpan Jani wrote:
> syzkaller hit the WARN_ON_ONCE() in mptcp_pm_alloc_anno_list() with
> the in-kernel path manager, reached via
> mptcp_pm_create_subflow_or_signal_addr().
>
> The WARN assumes the kernel PM can never reselect an address that is
> still in msk->pm.anno_list. That is not true: when an endpoint is
> removed and re-added while a previously sent ADD_ADDR is still
> awaiting its echo, the endpoint id becomes available again in
> id_avail_bitmap, but the matching anno_list entry (with its
> retransmit timer) is still alive. The in-progress guard in
> mptcp_pm_create_subflow_or_signal_addr() only checks
> BIT(MPTCP_ADD_ADDR_SIGNAL), which is already cleared once the option
> has been transmitted, so the address gets reselected and reaches
> mptcp_pm_alloc_anno_list() a second time.
From what I understand, it means that if a "signal" MPTCP endpoint is
removed the echo got received, the in-kernel PM will continue
retransmitting the ADD_ADDR. That doesn't seem correct. I didn't check
in the code, but I thought that the retransmit timer was at least
stopped, but maybe the entry was not removed from the list?
Does it also mean that if an ADD_ADDR echo is never received, the entry
is never removed, even after having reached the max retransmissions?
> This is a benign transient state, so drop the WARN. For the kernel
> PM, just bail out: the ADD_ADDR is already in flight, and the PM will
> be rescheduled once it completes (or once the stale entry's timer
> expires).
If I understand correctly, the transient state is not benign, and the
WARN should not be dropped.
Also, it would be nice to add a new test to validate that. Here, it
might be easier with a packetdrill test [1]: start with one sending an
ADD_ADDR [2], but don't send the echo, and instead, remove and re-add
the endpoint.
[1] https://github.com/multipath-tcp/packetdrill
[2]
https://github.com/multipath-tcp/packetdrill/blob/mptcp-net-next/gtests/net/mptcp/add_addr/add_addr4_server.pkt
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2026-05-26 8:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-25 12:19 [PATCH] mptcp: pm: don't WARN on re-announced addr in kernel PM Kalpan Jani
2026-05-25 13:31 ` MPTCP CI
2026-05-26 8:39 ` Matthieu Baerts [this message]
2026-05-26 11:15 ` [PATCH net] " Kalpan Jani
2026-05-27 0:59 ` Matthieu Baerts
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=07bf06c0-20dd-4e31-960a-b79f6fffcecc@kernel.org \
--to=matttbe@kernel.org \
--cc=janak@mpiric.us \
--cc=kalpan.jani@mpiricsoftware.com \
--cc=kalpanjani009@gmail.com \
--cc=martineau@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=shardul.b@mpiricsoftware.com \
--cc=shardulsb08@gmail.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