CVE-2022-2347
High · 7.7CVSS
7.7
EPSS
0.6%
Published
Sep 23, 2022
CISA due date
—
Cloudanix analysis
A mistake in how certain devices handle USB connections during startup could let a person with physical access take control of the device.
- 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
- Obtain physical access to the target device
- Connect a USB device capable of sending crafted DFU setup packets
- Issue a DFU download setup packet with wLength exceeding the allocated buffer size
- 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
- CVE-2024-42040 Buffer Overflow vulnerability in the net/bootp.c in DENEX U-Boot from its initial commit… Also affects u-boot
- CVE-2022-34835 In Das U-Boot through 2022.07-rc5, an integer signedness error and resultant stack-based… Also affects u-boot
- CVE-2022-30790 Das U-Boot 2022.01 has a Buffer Overflow, a different issue than CVE-2022-30552. Also affects u-boot
- CVE-2022-30552 Das U-Boot 2022.01 has a Buffer Overflow. Also affects u-boot
- CVE-2026-111497 A buffer overflow vulnerability in the Brotli decoder (c/dec/decode.c) in Google Brotli… CWE-787
- CVE-2026-112397 Pillow is a Python imaging library. CWE-787
- CVE-2026-112059 libLAS through 1.8.1 contains a heap out-of-bounds write vulnerability in the point… CWE-787
- CVE-2026-89088 A flaw was found in parted. CWE-787