Cloudanix VulnDB

CVE-2022-2347

High · 7.7

CVSS

7.7

EPSS

0.6%

Published

Sep 23, 2022

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A mistake in how certain devices handle USB connections during startup could let a person with physical access take control of the device.

Exploit Available
Exploitation
Physical Access
Attacker needs
Physical Access
Complexity
High
Impact
Full Compromise
Component
Firmware
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Unchecked wLength field in USB DFU download setup packets combined with missing direction verification allows an attacker to write beyond the heap-allocated request buffer when the supplied length exceeds 4096 bytes, resulting in memory corruption.

Why it matters to the business

Physical compromise of bootloader integrity on affected embedded devices can enable persistent unauthorized code execution, device takeover, or supply-chain tampering with downstream products that rely on this bootloader.

How an attack unfolds

An attacker with physical access crafts a malicious USB DFU download setup packet containing an oversized wLength value that bypasses both length validation and direction checks, triggering a heap overflow during the transfer and allowing control-flow hijacking or data corruption in the bootloader.

How to fix it

Apply the upstream U-Boot patch that enforces proper bounds checking on the wLength field and validates transfer direction in the DFU implementation; if patching is not feasible, disable the DFU feature at build time or runtime where operationally acceptable.

How to confirm the fix worked

Inspect the DFU handler source for explicit length validation against the request buffer size and direction verification, then perform functional testing with oversized and direction-mismatched DFU packets to confirm the overflow is prevented.

Typical attack path

  1. Obtain physical access to the target device
  2. Connect a USB device capable of sending crafted DFU setup packets
  3. Issue a DFU download setup packet with wLength exceeding the allocated buffer size
  4. Exploit the resulting heap memory corruption to execute arbitrary code or alter boot behavior

How to detect it

Review bootloader or system logs for DFU transfer events with anomalous lengths; examine USB traffic captures for setup packets containing wLength values greater than 4096 bytes during DFU operations.

What your security team should do

  • Inventory all devices and firmware builds that include U-Boot with DFU enabled
  • Prioritize patching or disabling DFU on any internet-exposed or high-value embedded systems
  • Enforce physical security controls and boot-time authentication on devices using this bootloader
  • Monitor for future U-Boot releases that address the DFU length validation issue

The record

There exists an unchecked length field in UBoot. The U-Boot DFU implementation does not bound the length field in USB DFU download setup packets, and it does not verify that the transfer direction corresponds to the specified command. Consequently, if a physical attacker crafts a USB DFU download setup packet with a `wLength` greater than 4096 bytes, they can write beyond the heap-allocated request buffer.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 u-boot 0 No fix
Debian:12 u-boot 0 2023.01~rc4+dfsg-2
Debian:13 u-boot 0 2023.01~rc4+dfsg-2
Ubuntu:16.04:LTS u-boot 0 No fix
Ubuntu:18.04:LTS u-boot 0 2020.10+dfsg-1ubuntu0~18.04.3
Ubuntu:20.04:LTS u-boot 0 2021.01+dfsg-3ubuntu0~20.04.5
Ubuntu:22.04:LTS u-boot 0 2022.01+dfsg-2ubuntu2.3
Ubuntu:22.04:LTS u-boot-nezha 0 2022.04+git20220405.7446a472-0ubuntu0.4
Ubuntu:24.04:LTS u-boot-nezha 0 No fix
Ubuntu:24.10 u-boot-nezha 0 No fix
Ubuntu:25.04 u-boot-nezha 0 No fix
Ubuntu:Pro:16.04:LTS u-boot 0 No fix

Related vulnerabilities