From: Ryan Walklin <ryan@testtoast.com>
To: ell@lists.linux.dev
Cc: Ryan Walklin <ryan@testtoast.com>
Subject: [PATCH 6/6] icmp6: Fix RA leak when stopped from a handler
Date: Tue, 17 Nov 2026 11:27:52 +1300 [thread overview]
Message-ID: <20261116222756.2921577-7-ryan@testtoast.com> (raw)
In-Reply-To: <20261116222756.2921577-1-ryan@testtoast.com>
If the ROUTER_FOUND event handler stops the client, which l_netconfig
does when the first RA can't be used for configuration, the parsed
l_icmp6_router is neither kept nor freed, leaking it.
Fixes: 90784c747ce4 ("icmp6: Emit L_ICMP6_CLIENT_EVENT_ROUTER_FOUND for all RAs")
---
ell/icmp6.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ell/icmp6.c b/ell/icmp6.c
index d352955..2a8798e 100644
--- a/ell/icmp6.c
+++ b/ell/icmp6.c
@@ -457,8 +457,10 @@ static int icmp6_client_handle_message(struct l_icmp6_client *client,
r);
/* DHCP6 client may have stopped us */
- if (!client->io)
+ if (!client->io) {
+ _icmp6_router_free(r);
return -ECANCELED;
+ }
if (!client->ra) {
client->ra = r;
--
2.55.0
prev parent reply other threads:[~2026-11-16 22:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 22:27 [PATCH 0/6] netconfig: RA route, SLAAC lifetime and DNS fixes Ryan Walklin
2026-11-16 22:27 ` [PATCH 1/6] netconfig: Allocate the expired lists Ryan Walklin
2026-11-16 22:27 ` [PATCH 2/6] netconfig: Fix leak of RA route data Ryan Walklin
2026-11-16 22:27 ` [PATCH 3/6] netconfig: Expire RA routes never refreshed Ryan Walklin
2026-11-16 22:27 ` [PATCH 4/6] netconfig: Fix the RFC 4862 2-hour rule Ryan Walklin
2026-11-16 22:27 ` [PATCH 5/6] netconfig: Skip duplicate DNS servers and domains Ryan Walklin
2026-11-16 22:27 ` Ryan Walklin [this message]
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=20261116222756.2921577-7-ryan@testtoast.com \
--to=ryan@testtoast.com \
--cc=ell@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox