CVE-2021-47272
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2021-47272 affects the Linux kernel's USB DWC3 gadget driver. The vulnerability was discovered in the dwc3_gadget_exit() function where a NULL pointer dereference could occur during host-to-peripheral mode switching. The issue exists when dwc3_gadget_init() fails during a mode switch and a pending gadget driver fails to bind, leading to an invalid dwc->gadget pointer being referenced (Kernel Git).

Technical details

The vulnerability occurs in a specific scenario involving the DWC3 USB controller's mode switching functionality. When switching from host to peripheral mode, if dwc3_gadget_init() fails while a pending gadget driver fails to bind, and then another mode switch occurs from peripheral to host mode, dwc3_gadget_exit() attempts to reference an invalid dwc->gadget pointer and calls dma_free_coherent() on unmapped DMA pointers. This can lead to a kernel panic (Kernel Git).

Impact

If exploited, this vulnerability could cause a kernel panic in systems using the affected Linux USB DWC3 driver, potentially leading to denial of service conditions. The issue specifically impacts systems that utilize USB device role switching functionality (Kernel Git).

Exploitability

The vulnerability can be triggered through a specific sequence of operations: starting DWC3 in peripheral mode, configuring ConfigFS gadget with FunctionFS, running a FunctionFS userspace application, binding the gadget driver, switching to host mode, stopping the FunctionFS application, and then performing additional mode switches. This makes it a relatively complex vulnerability to exploit but one that could be triggered through normal USB device operations (Kernel Git).

Mitigation and workarounds

The issue has been fixed by adding a NULL pointer check in dwc3_gadget_exit() and properly handling the gadget pointer in the failure path of dwc3_gadget_init(). The fix involves setting dwc->gadget to NULL in the failure path and adding a check to bail out unless the gadget pointer is valid (Kernel Git).

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-80904MEDIUM5.9
  • Linux Kernel logoLinux Kernel
  • linux-aws-6.14
NoYesSep 04, 2026
CVE-2026-80905MEDIUM5.5
  • Linux Kernel logoLinux Kernel
  • linux-gkeop
NoYesSep 04, 2026
CVE-2026-80913MEDIUM4.4
  • Linux Kernel logoLinux Kernel
  • linux-ibm-5.4
NoYesSep 04, 2026
CVE-2026-80912MEDIUM4.4
  • Linux Kernel logoLinux Kernel
  • linux-oem-6.14
NoYesSep 04, 2026
CVE-2026-80906NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux-azure-nvidia-6.14
NoYesSep 04, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management