// For flags

CVE-2024-36977

usb: dwc3: Wait unconditionally after issuing EndXfer command

Severity Score

"-"
*CVSS v-

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

Track
*SSVC
Descriptions

In the Linux kernel, the following vulnerability has been resolved:

usb: dwc3: Wait unconditionally after issuing EndXfer command

Currently all controller IP/revisions except DWC3_usb3 >= 310a
wait 1ms unconditionally for ENDXFER completion when IOC is not
set. This is because DWC_usb3 controller revisions >= 3.10a
supports GUCTL2[14: Rst_actbitlater] bit which allows polling
CMDACT bit to know whether ENDXFER command is completed.

Consider a case where an IN request was queued, and parallelly
soft_disconnect was called (due to ffs_epfile_release). This
eventually calls stop_active_transfer with IOC cleared, hence
send_gadget_ep_cmd() skips waiting for CMDACT cleared during
EndXfer. For DWC3 controllers with revisions >= 310a, we don't
forcefully wait for 1ms either, and we proceed by unmapping the
requests. If ENDXFER didn't complete by this time, it leads to
SMMU faults since the controller would still be accessing those
requests.

Fix this by ensuring ENDXFER completion by adding 1ms delay in
__dwc3_stop_active_transfer() unconditionally.

En el kernel de Linux, se resolvió la siguiente vulnerabilidad: usb: dwc3: Espere incondicionalmente después de emitir el comando EndXfer Actualmente, todas las IP/revisiones del controlador excepto DWC3_usb3 >= 310a esperan 1 ms incondicionalmente para que ENDXFER se complete cuando el IOC no está configurado. Esto se debe a que las revisiones del controlador DWC_usb3 >= 3.10a admiten el bit GUCTL2[14: Rst_actbitlater] que permite sondear el bit CMDACT para saber si se completó el comando ENDXFER. Considere un caso en el que se puso en cola una solicitud IN y, en paralelo, se llamó a soft_disconnect (debido a ffs_epfile_release). Esto eventualmente llama a stop_active_transfer con el IOC borrado, por lo tanto, send_gadget_ep_cmd() omite la espera de que CMDACT se borre durante EndXfer. Para los controladores DWC3 con revisiones >= 310a, tampoco esperamos forzosamente 1 ms y procedemos a desasignar las solicitudes. Si ENDXFER no se completó en este momento, se producirán fallas de SMMU ya que el controlador aún estaría accediendo a esas solicitudes. Solucione este problema asegurando la finalización de ENDXFER agregando un retraso de 1 ms en __dwc3_stop_active_transfer() incondicionalmente.

*Credits: N/A
CVSS Scores
Attack Vector
-
Attack Complexity
-
Privileges Required
-
User Interaction
-
Scope
-
Confidentiality
-
Integrity
-
Availability
-
* Common Vulnerability Scoring System
SSVC
  • Decision:Track
Exploitation
None
Automatable
No
Tech. Impact
Partial
* Organization's Worst-case Scenario
Timeline
  • 2024-05-30 CVE Reserved
  • 2024-06-18 CVE Published
  • 2024-06-19 EPSS Updated
  • 2024-08-02 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 6.1 < 6.1.92
Search vendor "Linux" for product "Linux Kernel" and version " >= 6.1 < 6.1.92"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 6.1 < 6.6.32
Search vendor "Linux" for product "Linux Kernel" and version " >= 6.1 < 6.6.32"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 6.1 < 6.8.11
Search vendor "Linux" for product "Linux Kernel" and version " >= 6.1 < 6.8.11"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 6.1 < 6.9.2
Search vendor "Linux" for product "Linux Kernel" and version " >= 6.1 < 6.9.2"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 6.1 < 6.10
Search vendor "Linux" for product "Linux Kernel" and version " >= 6.1 < 6.10"
en
Affected