Skip to content
Memory corruption Write-up Advanced

Pwn2Own Automotive: CHARX Vulnerability Discovery

The CHARX SEC-3100 EV charger's controller agent had a parsing mismatch in HomePlug packets that could cause a null dereference, and a use-after-free during process teardown. An attacker could crash the service and potentially exploit the use-after-free, though the text only demonstrates a crash.

blog.ret2.io

Published on blog.ret2.io

The first Pwn2Own Automotive introduced an interesting category of targets: electric vehicle chargers. This post will detail some of our research on the Phoenix Contact CHARX SEC-3100 and the bugs we discovered, with a 2nd separate post covering the actual exploit.

The author, on blog.ret2.io

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a parsing error where the length field is read from the wrong offset, and a destructor ordering issue where an inner object calls back into an outer object after part of it has been destroyed.

Impact

An attacker could crash the controller agent service and potentially exploit the use-after-free, though the text only demonstrates a crash and the exploitation is covered in a follow-up post.

What the attacker needed

Access to ETH1 port; ability to send TCP and raw packets

How it was found

  1. Connect to the ETH1 port of the charger.
  2. Send a configAccess message over TCP to set the HomePlug interface to eth1.
  3. Send a v2gMessage request over TCP to start the HomePlug server.
  4. Send a crafted HomePlug packet with a mismatched length field to trigger a null dereference.
  5. The null dereference causes a SIGSEGV, which invokes the signal handler and calls exit, triggering the use-after-free during cleanup.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This is about finding bugs in an electric vehicle charger's software. The researchers found two mistakes: one lets an attacker crash a service by sending a malformed network message, and another causes memory to be used after it's freed when the program shuts down. These are common types of memory safety bugs.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.