public inbox for connman@lists.linux.dev
 help / color / mirror / Atom feed
From: Ed Rose | Tewke <ed@tewke.com>
To: "connman@lists.linux.dev" <connman@lists.linux.dev>
Cc: Ed Rose | Tewke <ed@tewke.com>
Subject: [PATCH 0/2] Resource leaks and Asus routers
Date: Thu, 12 Mar 2026 15:14:52 +0000	[thread overview]
Message-ID: <20260312151445.720413-2-ed@tewke.com> (raw)

Hi all,

This is my first time submitting a patch to a mailing list so I apologise if I've made mistakes with formatting.

This short patch series fixes a couple of bugs that we've discovered in Connman that are triggered by a weird hack some mainstream routers have implemented. I'll attach a link to an article below on the topic, but the TL;DR is that Asus routers intentionally try to crash a buggy windows service that handles Proxy Auto-configuration by adding DHCP option 252 with the contents '\n' (apparently for performance reasons). Connman unfortunately tries to use this value and gets itself into a loop of failing online checks, breaking online detection and triggering the second bug.

The second bug is a memory and file descriptor leak that occurs due to the `wispr_portal_context` not being unreffed under some conditions, notably when it fails to resolve a proxy.

The result of both of these together is that connman eventually exhausts its fd limit and is unable to function.

Here is a link to a blog post explaining the strange DHCP behaviour:
https://nuxx.net/blog/2022/12/23/how-asus-and-a-microsoft-bug-almost-broke-remote-work/

This bug is super easy to replicate if you have a router that allows configuring DHCP. Ensure connman is configured to perform online checks and set option 252 with a payload of '\n' (0x0a). Watch the file descriptor list in `/proc/<pid>/fd` grow.

Ed Rose (2):
  wispr: Ensure memory cleaned up in all cases
  dhcp: Ignore empty DHCP Option 252

 src/dhcp.c  | 7 +++++--
 src/wispr.c | 3 ++-
 2 files changed, 7 insertions(+), 3 deletions(-)

--
2.43.0


             reply	other threads:[~2026-03-12 15:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-12 15:14 Ed Rose | Tewke [this message]
2026-03-12 15:14 ` [PATCH 1/2] wispr: Ensure memory cleaned up in all cases Ed Rose | Tewke
2026-03-12 15:15 ` [PATCH 2/2] dhcp: Ignore empty DHCP Option 252 Ed Rose | Tewke

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=20260312151445.720413-2-ed@tewke.com \
    --to=ed@tewke.com \
    --cc=connman@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