* [PATCH net] sctp: reset stored flag for each association
@ 2026-11-08 16:11 Weiming Shi
2026-11-08 16:16 ` netdev-bot+sinfo
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Weiming Shi @ 2026-11-08 16:11 UTC (permalink / raw)
To: Marcelo Ricardo Leitner, Xin Long, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Simon Horman
Cc: linux-sctp, netdev, linux-kernel, Wei Yongjun, Michio Honda,
YOSHIFUJI Hideaki, Xiang Mei, Weiming Shi, stable
sctp_send_asconf_del_ip() walks every association on an endpoint. The
stored flag records that the current association took the single-homed
deferral path and therefore did not allocate an ASCONF chunk. It is
currently scoped to the whole function. Once one association sets it,
later eligible multihomed associations allocate chunks but skip
sctp_send_asconf(), leaking each chunk and its skb.
Reset stored for every association so only an association taking the
deferral path skips transmission. In an A/B kmemleak test, the
vulnerable kernel reported 210 leaked objects from this call path and the
fixed kernel reported none.
Cc: stable@vger.kernel.org
Fixes: 8a07eb0a50ae ("sctp: Add ASCONF operation on the single-homed host")
Reported-by: Xiang Mei <xmei5@asu.edu>
Signed-off-by: Weiming Shi <bestswngs@gmail.com>
---
net/sctp/socket.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index c7b9e325ec1c..ed91ceff45a9 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -771,7 +771,6 @@ static int sctp_send_asconf_del_ip(struct sock *sk,
struct sctp_sockaddr_entry *saddr;
int i;
int retval = 0;
- int stored = 0;
chunk = NULL;
sp = sctp_sk(sk);
@@ -784,6 +783,7 @@ static int sctp_send_asconf_del_ip(struct sock *sk,
__func__, sk, addrs, addrcnt);
list_for_each_entry(asoc, &ep->asocs, asocs) {
+ int stored = 0;
if (!asoc->peer.asconf_capable)
continue;
--
2.56.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] sctp: reset stored flag for each association
2026-11-08 16:11 [PATCH net] sctp: reset stored flag for each association Weiming Shi
@ 2026-11-08 16:16 ` netdev-bot+sinfo
2026-11-10 15:31 ` Xin Long
2026-11-11 0:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: netdev-bot+sinfo @ 2026-11-08 16:16 UTC (permalink / raw)
To: Weiming Shi
Cc: Marcelo Ricardo Leitner, Xin Long, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Simon Horman, linux-sctp, netdev,
linux-kernel, Wei Yongjun, Michio Honda, YOSHIFUJI Hideaki,
Xiang Mei, stable
Hi!
This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:
- How the issue was discovered, e.g. hit in production, hit during
development, syzbot report, manual code inspection, LLM or static
analysis tool scan.
Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account. If the series needs another revision for
other reasons, please include the information in the commit messages
then.
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] sctp: reset stored flag for each association
2026-11-08 16:11 [PATCH net] sctp: reset stored flag for each association Weiming Shi
2026-11-08 16:16 ` netdev-bot+sinfo
@ 2026-11-10 15:31 ` Xin Long
2026-11-11 0:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Xin Long @ 2026-11-10 15:31 UTC (permalink / raw)
To: Weiming Shi
Cc: Marcelo Ricardo Leitner, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Simon Horman, linux-sctp, netdev,
linux-kernel, Wei Yongjun, Michio Honda, YOSHIFUJI Hideaki,
Xiang Mei, stable
On Sun, Nov 8, 2026 at 11:12 AM Weiming Shi <bestswngs@gmail.com> wrote:
>
> sctp_send_asconf_del_ip() walks every association on an endpoint. The
> stored flag records that the current association took the single-homed
> deferral path and therefore did not allocate an ASCONF chunk. It is
> currently scoped to the whole function. Once one association sets it,
> later eligible multihomed associations allocate chunks but skip
> sctp_send_asconf(), leaking each chunk and its skb.
>
> Reset stored for every association so only an association taking the
> deferral path skips transmission. In an A/B kmemleak test, the
> vulnerable kernel reported 210 leaked objects from this call path and the
> fixed kernel reported none.
>
> Cc: stable@vger.kernel.org
> Fixes: 8a07eb0a50ae ("sctp: Add ASCONF operation on the single-homed host")
> Reported-by: Xiang Mei <xmei5@asu.edu>
> Signed-off-by: Weiming Shi <bestswngs@gmail.com>
> ---
> net/sctp/socket.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/sctp/socket.c b/net/sctp/socket.c
> index c7b9e325ec1c..ed91ceff45a9 100644
> --- a/net/sctp/socket.c
> +++ b/net/sctp/socket.c
> @@ -771,7 +771,6 @@ static int sctp_send_asconf_del_ip(struct sock *sk,
> struct sctp_sockaddr_entry *saddr;
> int i;
> int retval = 0;
> - int stored = 0;
>
> chunk = NULL;
> sp = sctp_sk(sk);
> @@ -784,6 +783,7 @@ static int sctp_send_asconf_del_ip(struct sock *sk,
> __func__, sk, addrs, addrcnt);
>
> list_for_each_entry(asoc, &ep->asocs, asocs) {
> + int stored = 0;
>
> if (!asoc->peer.asconf_capable)
> continue;
> --
> 2.56.0
>
Acked-by: Xin Long <lucien.xin@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] sctp: reset stored flag for each association
2026-11-08 16:11 [PATCH net] sctp: reset stored flag for each association Weiming Shi
2026-11-08 16:16 ` netdev-bot+sinfo
2026-11-10 15:31 ` Xin Long
@ 2026-11-11 0:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-11-11 0:50 UTC (permalink / raw)
To: Weiming Shi
Cc: marcelo.leitner, lucien.xin, davem, edumazet, kuba, pabeni,
horms, linux-sctp, netdev, linux-kernel, yjwei, micchie,
yoshfuji, xmei5, stable
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Sun, 8 Nov 2026 08:11:49 -0800 you wrote:
> sctp_send_asconf_del_ip() walks every association on an endpoint. The
> stored flag records that the current association took the single-homed
> deferral path and therefore did not allocate an ASCONF chunk. It is
> currently scoped to the whole function. Once one association sets it,
> later eligible multihomed associations allocate chunks but skip
> sctp_send_asconf(), leaking each chunk and its skb.
>
> [...]
Here is the summary with links:
- [net] sctp: reset stored flag for each association
https://git.kernel.org/netdev/net/c/173712d868eb
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-11 0:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-08 16:11 [PATCH net] sctp: reset stored flag for each association Weiming Shi
2026-11-08 16:16 ` netdev-bot+sinfo
2026-11-10 15:31 ` Xin Long
2026-11-11 0:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®