From: sashiko-bot@kernel.org
To: "Kyuwon Cho" <kyuwon.cho@skku.edu>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH net] mptcp: pm: preserve the port when removing ID 0
Date: Sat, 05 Dec 2026 05:11:35 +0000 [thread overview]
Message-ID: <sashiko-outbox-251109@kernel.org> (raw)
In-Reply-To: <179633974213.577499.3953204420789445318@skku.edu>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] mptcp: port mismatch in mptcp_nl_remove_id_zero_address()
anno_list lookup
--
commit ad23222f28ecec43f6d6673d450540a7b1eb5a74
Author: Kyuwon Cho <kyuwon.cho@skku.edu>
mptcp: pm: preserve the port when removing ID 0
This commit changes mptcp_nl_remove_id_zero_address() to copy addr->port
instead of clearing anno_addr.port before calling
mptcp_pm_announced_remove().
> diff --git a/net/mptcp/pm_kernel.c b/net/mptcp/pm_kernel.c
> index 47c6ccb0a29e4..ec49e9f2a730d 100644
> --- a/net/mptcp/pm_kernel.c
> +++ b/net/mptcp/pm_kernel.c
> @@ -1163,7 +1163,7 @@ static int mptcp_nl_remove_id_zero_address(struct net *net,
> lock_sock(sk);
> /* Drop a possibly pending ADD_ADDR for this address. */
> anno_addr = msk_local;
> - anno_addr.port = 0;
> + anno_addr.port = addr->port;
> announced = mptcp_pm_announced_remove(msk, &anno_addr);
> spin_lock_bh(&msk->pm.lock);
> if (announced)
[Severity: Medium]
Can copying addr->port here still miss pending ID 0 entries in
msk->pm.anno_list when the removal request's port differs from the
announced endpoint's port?
mptcp_pm_announced_lookup() always compares ports strictly, while
mptcp_nl_remove_id_zero_address() matches msk for both addr->port == 0
and addr->port == msk_local.port.
If a portless signal endpoint was announced with port 0 and userspace
deletes ID 0 with msk_local.port, this introduces a regression where
mptcp_pm_announced_remove() misses the port-0 entry that it previously
removed.
Conversely, a portless deletion (addr->port == 0) still misses an ID 0
entry announced with msk_local.port. Both portless and port-specific
signal endpoints for the same IP can also coexist as ID 0 entries in
anno_list, so a single lookup can remove at most one of them.
When an entry is missed, msk->pm.add_addr_signaled is leaked, the stale
timer keeps retransmitting, and __mark_subflow_endp_available(msk, 0)
re-enables the endpoint so re-announcing it hits
WARN_ON_ONCE(mptcp_pm_is_kernel(msk)) in mptcp_pm_announced_alloc().
Removing pending anno_list entries by ID 0 (or checking both port 0 and
msk_local.port) would handle all three cases.
--
Sashiko AI review · https://sashiko.dev/#/patchset/179633974213.577499.3953204420789445318@skku.edu?part=1
next prev parent reply other threads:[~2026-12-05 5:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 5:11 [PATCH net] mptcp: pm: preserve the port when removing ID 0 Kyuwon Cho
2026-12-04 6:38 ` MPTCP CI
2026-12-04 11:05 ` Matthieu Baerts
2026-12-05 1:47 ` Kyuwon Cho
2026-12-05 5:11 ` sashiko-bot [this message]
2026-12-05 5:48 ` netdev-bot+sashiko
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=sashiko-outbox-251109@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=kyuwon.cho@skku.edu \
--cc=mptcp@lists.linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.