sctp: reset stored flag for each association
Subsystems (4)
PATCH 1/1 sctp: reset stored flag for each association
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.
--- net/sctp/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/sctp/socket.c +1 -1
@@ -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 ;
Signature · 1 line
2.56.0
[email protected]
AI reviewThis is an automated message. This series looks like a fix, but its commit messages seem to be missing some information:
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.
Quoted 42 lines · Weiming Shi
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 skipsctp_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.
Fixes 8a07eb0a50ae ("sctp: Add ASCONF operation on the single-homed host")Reported-by Xiang Mei <[email protected]>Signed-off-by Weiming Shi <[email protected]>--- net/sctp/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/sctp/socket.c +1
-2@@ -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 ; --
Quoted 2 lines
2.56.0
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 8 lines · 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 skipsctp_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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html