Resource leaks and Asus routers
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | wispr: Ensure memory cleaned up in all casessrc/ | +2 | 0 replies | |
| 2/2 | dhcp: Ignore empty DHCP Option 252src/ | +5 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] Resource leaks and Asus routers
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