Security Vulnerability Report
中文
CVE-2026-4179 CVSS 6.1 MEDIUM

CVE-2026-4179

Published: 2026-03-16 14:19:58
Last Modified: 2026-04-02 20:45:42

Description

Issues in stm32 USB device driver (drivers/usb/device/usb_dc_stm32.c) can lead to an infinite while loop.

CVSS Details

CVSS Score
6.1
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:H

Configurations (Affected Products)

cpe:2.3:o:zephyrproject:zephyr:*:*:*:*:*:*:*:* - VULNERABLE
Zephyr RTOS STM32 USB device driver (drivers/usb/device/usb_dc_stm32.c) - 受影响版本需参考Zephyr官方安全公告

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// PoC concept for CVE-2026-4179 - STM32 USB infinite loop trigger // This is a conceptual PoC demonstrating the vulnerability trigger condition // Note: Actual exploitation requires specific hardware and USB setup #include <zephyr.h> #include <usb/usb_device.h> #include <drivers/usb/udc.h> // Trigger condition: specific USB state transition sequence void trigger_infinite_loop(void) { // Step 1: Initialize USB device in STM32 if (usb_enable(NULL) != 0) { return; } // Step 2: Trigger specific error condition in USB_dc_stm32 // The vulnerability exists in the state machine handling // Specific USB control transfer sequences can cause: // - SETUP transaction handling enters infinite loop // - Endpoint state transitions fail to exit while loop // - IRQ handler enters deadlock condition // The PoC would involve: // 1. Sending malformed USB SETUP packets // 2. Forcing specific USB device state transitions // 3. Triggering endpoint interrupt conditions that loop indefinitely printk("Attempting to trigger CVE-2026-4179\n"); printk("Vulnerable code path: usb_dc_stm32.c\n"); printk("Target: infinite while loop in USB state machine\n"); } // Attack scenario: // 1. Attacker gains local access to device running Zephyr RTOS // 2. Attacker triggers USB state that causes infinite loop // 3. System becomes unresponsive - DoS achieved /* Vulnerable code pattern (conceptual): void usb_dc_stm32_irq_handler(void) { // ... while (1) { // Infinite loop vulnerability status = usb_dc_stm32_ep_read(...); if (status != 0) { // Should break but condition never met // Loop continues indefinitely } } // ... } */

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-4179", "sourceIdentifier": "[email protected]", "published": "2026-03-16T14:19:58.400", "lastModified": "2026-04-02T20:45:41.860", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Issues in stm32 USB device driver (drivers/usb/device/usb_dc_stm32.c) can lead to an infinite while loop."}, {"lang": "es", "value": "Problemas en el controlador de dispositivo USB stm32 (drivers/usb/device/usb_dc_stm32.c) pueden llevar a un bucle while infinito."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:H", "baseScore": 6.1, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "LOW", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 4.2}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-835"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:zephyrproject:zephyr:*:*:*:*:*:*:*:*", "versionEndIncluding": "4.3.0", "matchCriteriaId": "7D912614-A39E-4C9B-AA54-187BC26337B9"}]}]}], "references": [{"url": "https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-9xg7-g3q3-9prf", "source": "[email protected]", "tags": ["Exploit", "Patch", "Vendor Advisory"]}, {"url": "https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-9xg7-g3q3-9prf", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Patch", "Vendor Advisory"]}]}}