Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
spd_flasher — CVE-2022-38694 Hardened Exploit - RP2350 USB Host Auto Flasher for Unisoc devices | Kitploit
Tools/GitHubGitHub/leochen-coremind/spd_flasher
Embedded Systems SecurityExploitationReverse EngineeringHardware HackingMobile SecurityLearning & Education
GitHubleochen-coremind/spd_flasher

spd_flasher

CVE-2022-38694 Hardened Exploit - RP2350 USB Host Auto Flasher for Unisoc devices

View Repository
31171 month agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2022-38694 Hardened Exploit — RP2350 USB Host Auto Flasher

中文版 README

Tutorial

  • UDX710 Boot Chain Reverse Engineering and RP2350 Hardened Boot Tutorial

Exploiting CVE-2022-38694 Unisoc BootROM vulnerability via Raspberry Pi RP2350 USB Host to automatically send SPL Loader on boot and start arbitrary u-boot.

Moves the exploit chain — originally requiring a PC + spd_dump — onto an RP2350 microcontroller. Plug in device, flash automatically, supports continuous flashing.

How It Works

CVE-2022-38694 is a one-time signature verification bypass in Unisoc BootROM. By sending an exec stub to a specific memory address, the return address is overwritten, bypassing signature checks and allowing BootROM to accept and execute arbitrary FDL1.

Key insight: FDL1 and SPL Loader share the same load address (0x28007000), so a patched SPL Loader can be sent in place of FDL1, booting arbitrary u-boot.

Hardening Process (Two Stages)

Stage 1: Initial Unlock (PC + spd_dump)

First-time setup requires a PC with spd_dump:

┌──────────────────────────────────────────────────────────────────────────┐
│                    Stage 1: PC-side Initial Unlock                       │
├──────────────────────────────────────────────────────────────────────────┤
│                                                                          │
│  Step 1: Exploit CVE-2022-38694 to boot patched SPL                     │
│  ┌────────────┐    ┌────────────┐    ┌─────────────────┐                │
│  │ Exec Stub  │───►│ spl-unlock │───►│ Device boots    │                │
│  │ @0x3F28    │    │ @0x28007000│    │ into DL mode    │                │
│  └────────────┘    └────────────┘    └────────┬────────┘                │
│                                               │                          │
│  Step 2: Send patched FDL2 via spd_dump, flash u-boot without           │
│          secure boot, erase splloader                                    │
│                                               │                          │
│  ┌─────────────────┐    ┌──────────────────────▼───────────┐            │
│  │ Send fdl2-dl    │───►│ Write u-boot (secure boot removed│            │
│  │ (patched FDL2)  │    │ + Erase splloader partition)     │            │
│  └─────────────────┘    └──────────────────────────────────┘            │
│                                                                          │
│  ★ After erasing splloader, device enters BootROM DL mode on every boot │
└──────────────────────────────────────────────────────────────────────────┘

Steps:

  1. Use CVE-2022-38694 to send spl-unlock.bin and boot the device
  2. Send patched fdl2-dl.bin (FDL2 with secure boot verification removed)
  3. Use FDL2 to write u-boot with secure boot removed to the uboot partition
  4. Erase splloader partition → device loses normal boot, enters BootROM DL mode on every power-on

Stage 2: Hardened Operation (RP2350 Auto Flash)

With splloader erased, the device enters BootROM download mode on every power-on. The RP2350 USB Host automatically handles the exploit chain:

┌──────────────────────────────────────────────────────────────────────────┐
│                   Stage 2: RP2350 Automated Boot                        │
├──────────────────────────────────────────────────────────────────────────┤
│                                                                          │
│  Power on → no splloader → BootROM download mode                        │
│                                                                          │
│  ┌─────────┐    ┌────────────┐    ┌─────────────┐    ┌──────────────┐  │
│  │ BootROM │───►│ Exec Stub  │───►│ spl-unlock  │───►│ U-Boot       │  │
│  │ Handshk │    │ Bypass sig │    │ as FDL1     │    │ (no secboot) │  │
│  └─────────┘    └────────────┘    └─────────────┘    │ Boot OK ✓    │  │
│                                                       └──────────────┘  │
│                                                                          │
│  ★ Fully automatic. Unplug → auto-reset → ready for next device.       │
└──────────────────────────────────────────────────────────────────────────┘

Why erase splloader?

  • Normal boot chain: BootROM → SPL Loader → u-boot → System
  • SPL Loader verifies u-boot signature — it will reject modified u-boot
  • With splloader erased, BootROM can't find SPL → falls into download mode
  • CVE-2022-38694 sends spl-unlock (skips signature check) → successfully boots u-boot without secure boot

Exploit Chain (RP2350 Execution)

┌─────────────┐     ┌──────────────────┐     ┌───────────────────┐     ┌──────────────┐
│  BootROM    │     │  Exec Stub       │     │  SPL Loader       │     │  U-Boot      │
│  Handshake  │ ──► │  @0x3F28 (136B)  │ ──► │  @0x28007000      │ ──► │  Boot OK     │
│  CHECK_BAUD │     │  Bypass sig chk  │     │  Replaces FDL1    │     │              │
└─────────────┘     └──────────────────┘     └───────────────────┘     └──────────────┘
  1. BootROM Handshake — CHECK_BAUD + CONNECT, establish BSL communication
  2. Send Exec Stub — Load 136 bytes to 0x3F28, exploit CVE-2022-38694 to overwrite return address, bypass signature verification
  3. Send SPL Loader — FDL1 and SPL Loader share load address 0x28007000, signature already bypassed
  4. Boot U-Boot — spl-unlock skips signature checks, boots u-boot with secure boot removed

Prerequisites: Patch Firmware

This project does not include universal patched firmware. You must patch your device's firmware yourself.

Patch Tutorial

Refer to TomKing062's Wiki:

  • 🇬🇧 patch_do_cboot — SPL (English)
  • 🇨🇳 patch_do_cboot — SPL (中文)

Firmware to Patch

FirmwarePatchOutputPurpose
FDL2 (u-boot/lk)NOP secure partition write checksfdl2-dl.binStage 1: sent via spd_dump for partition writes
U-BootPatch do_cboot() to remove secure bootModified ubootStage 1: written to device, replaces stock uboot
SPL LoaderNOP signcheck() and result checksspl-unlock.binStage 1 & 2: sent via CVE-2022-38694

Convert spl-unlock.bin to Header

xxd -i spl-unlock.bin > fdl1_data.h

Update array name and macros in fdl1_data.h to match code references.

Supported Platforms

This project currently uses the UDX710 exec stub (custom_exec_3f28.bin).

To adapt for other chips, replace the exec stub and load address in custom_exec_data.h:

PlatformExec AddressReference
UDX7100x3F28This project (default)
UMS312 / UMS5120x3EE8exec_addr_v2
UMS92300x65017F08exec_addr_v2
SC9820E / SC9832E0x4F18 / 0x4EE8CVE-2022-38694

Full support list: SupportList

Hardware Requirements

ComponentDescription
RP2350 Boarde.g. Raspberry Pi Pico 2
USB Host CableOTG or hardware mod for RP2350 USB Host
Target SPD Devicesplloader erased, auto-enters BootROM DL mode on power-on

Pin Configuration

Download Tool