<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://vulnerability.circl.lu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-10-03T22:41:40.196274+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@circl.lu</email>
  </author>
  <link href="https://vulnerability.circl.lu" rel="alternate"/>
  <generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
  <subtitle>Contains only the most 10 recent entries.</subtitle>
  <entry>
    <id>https://vulnerability.circl.lu/vuln/cve-2021-47272</id>
    <title>CVE-2021-47272 — usb: dwc3: gadget: Bail from dwc3_gadget_exit() if dwc-&gt;gadget is NULL</title>
    <updated>2026-10-03T22:41:40.340816+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> Linux</p>
<p>In the Linux kernel, the following vulnerability has been resolved:</p>
<p>usb: dwc3: gadget: Bail from dwc3_gadget_exit() if dwc-&gt;gadget is NULL</p>
<p>There exists a possible scenario in which dwc3_gadget_init() can fail:
during during host -&gt; peripheral mode switch in dwc3_set_mode(), and
a pending gadget driver fails to bind.  Then, if the DRD undergoes
another mode switch from peripheral-&gt;host the resulting
dwc3_gadget_exit() will attempt to reference an invalid and dangling
dwc-&gt;gadget pointer as well as call dma_free_coherent() on unmapped
DMA pointers.</p>
<p>The exact scenario can be reproduced as follows:
 - Start DWC3 in peripheral mode
 - Configure ConfigFS gadget with FunctionFS instance (or use g_ffs)
 - Run FunctionFS userspace application (open EPs, write descriptors, etc)
 - Bind gadget driver to DWC3's UDC
 - Switch DWC3 to host mode
   =&gt; dwc3_gadget_exit() is called. usb_del_gadget() will put the
	ConfigFS driver instance on the gadget_driver_pending_list
 - Stop FunctionFS application (closes the ep files)
 - Switch DWC3 to peripheral mode
   =&gt; dwc3_gadget_init() fails as usb_add_gadget() calls
	check_pending_gadget_drivers() and attempts to rebind the UDC
	to the ConfigFS gadget but fails with -19 (-ENODEV) because the
	FFS instance is not in FFS_ACTIVE state (userspace has not
	re-opened and written the descriptors yet, i.e. desc_ready!=0).
 - Switch DWC3 back to host mode
   =&gt; dwc3_gadget_exit() is called again, but this time dwc-&gt;gadget
	is invalid.</p>
<p>Although it can…</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/cve-2021-47272"/>
  </entry>
</feed>
