{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-36977","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2024-05-30T15:25:07.082Z","datePublished":"2024-06-18T19:27:58.319Z","dateUpdated":"2026-08-05T11:32:26.465Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T11:32:26.465Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: dwc3: Wait unconditionally after issuing EndXfer command\n\nCurrently all controller IP/revisions except DWC3_usb3 >= 310a\nwait 1ms unconditionally for ENDXFER completion when IOC is not\nset. This is because DWC_usb3 controller revisions >= 3.10a\nsupports GUCTL2[14: Rst_actbitlater] bit which allows polling\nCMDACT bit to know whether ENDXFER command is completed.\n\nConsider a case where an IN request was queued, and parallelly\nsoft_disconnect was called (due to ffs_epfile_release). This\neventually calls stop_active_transfer with IOC cleared, hence\nsend_gadget_ep_cmd() skips waiting for CMDACT cleared during\nEndXfer. For DWC3 controllers with revisions >= 310a, we don't\nforcefully wait for 1ms either, and we proceed by unmapping the\nrequests. If ENDXFER didn't complete by this time, it leads to\nSMMU faults since the controller would still be accessing those\nrequests.\n\nFix this by ensuring ENDXFER completion by adding 1ms delay in\n__dwc3_stop_active_transfer() unconditionally."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The documented trigger is a local userspace operation — `ffs_epfile_release()` on a FunctionFS endpoint file racing an in-flight IN request — which reaches `dwc3_gadget_soft_disconnect()` → `dwc3_stop_active_transfers()` without any physical access to the device. A local process holding the FFS endpoint fds (or any process able to cause the FFS daemon's fds to close) drives the whole sequence via ordinary write/close syscalls.\nAC:L - The attacker controls both sides of the race: it queues the transfer (write to the ep file) and triggers the teardown (close of the ep file), and the pre-fix code performs zero wait after ENDXFER, so the window is essentially always open rather than a narrow timing fluke. The attempt is freely repeatable and the affected DWC_usb3 ≥ 3.10a IP is a common mainstream configuration.\nPR:L - Only an unprivileged local process with access to the FunctionFS endpoint files (whose ownership is set by the mount's uid=/gid= options, e.g. the adb/MTP user on Android) is needed; no root or CAP_SYS_ADMIN is required. Queuing a transfer and closing the descriptor are ordinary file operations.\nUI:N - The attacking process performs the queue and the release itself; no victim action is required. The USB cable being attached is an ambient condition of the target device (phone on a charger/PC, kiosk, embedded controller), not an interaction the attacker must induce.\nS:U - The stale DMA writes into kernel memory the controller was already granted access to, and both the vulnerable component and the impacted component are the kernel itself. No VM, IOMMU, or sandbox security boundary is crossed.\nC:H - For IN endpoints the controller keeps reading the buffer after `usb_gadget_unmap_request_by_dev()` and `kfree()`, so contents of reallocated kernel heap memory are streamed out over USB to the attached host — an arbitrary-content kernel memory disclosure. This is a use-after-free read with attacker-observable output.\nI:H - For OUT endpoints the controller continues writing host-supplied data into memory that has been DMA-unmapped and freed, giving a use-after-free write with attacker-controlled contents into reallocated kernel objects. That is a heap-spray-friendly write primitive suitable for control-flow hijacking.\nA:H - The commit reports SMMU faults from the controller accessing already-unmapped requests, which on typical SoC IOMMU configurations abort the transaction and panic or wedge the USB controller. Absent an IOMMU, the resulting freed-memory corruption reliably produces oopses and kernel panics."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/usb/dwc3/gadget.c"],"versions":[{"version":"b353eb6dc285a0775a447f53e5b2a50bf3f9684f","lessThan":"341eb08dbca9eae05308c442fbfab1813a44c97a","status":"affected","versionType":"git"},{"version":"b353eb6dc285a0775a447f53e5b2a50bf3f9684f","lessThan":"ec96bcf5f96a7a5c556b0e881ac3e5c3924d542c","status":"affected","versionType":"git"},{"version":"b353eb6dc285a0775a447f53e5b2a50bf3f9684f","lessThan":"4a387e032909c6dc2b479452c5bbe9a252057925","status":"affected","versionType":"git"},{"version":"b353eb6dc285a0775a447f53e5b2a50bf3f9684f","lessThan":"1ba145f05b5c8f0b1a947a0633b5edff5dd1f1c5","status":"affected","versionType":"git"},{"version":"b353eb6dc285a0775a447f53e5b2a50bf3f9684f","lessThan":"1d26ba0944d398f88aaf997bda3544646cf21945","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/usb/dwc3/gadget.c"],"versions":[{"version":"6.1","status":"affected"},{"version":"0","lessThan":"6.1","status":"unaffected","versionType":"semver"},{"version":"6.1.92","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.32","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.8.11","lessThanOrEqual":"6.8.*","status":"unaffected","versionType":"semver"},{"version":"6.9.2","lessThanOrEqual":"6.9.*","status":"unaffected","versionType":"semver"},{"version":"6.10","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.1.92"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.6.32"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.8.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.9.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.10"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/341eb08dbca9eae05308c442fbfab1813a44c97a"},{"url":"https://git.kernel.org/stable/c/ec96bcf5f96a7a5c556b0e881ac3e5c3924d542c"},{"url":"https://git.kernel.org/stable/c/4a387e032909c6dc2b479452c5bbe9a252057925"},{"url":"https://git.kernel.org/stable/c/1ba145f05b5c8f0b1a947a0633b5edff5dd1f1c5"},{"url":"https://git.kernel.org/stable/c/1d26ba0944d398f88aaf997bda3544646cf21945"}],"title":"usb: dwc3: Wait unconditionally after issuing EndXfer command","x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"problemTypes":[{"descriptions":[{"type":"CWE","lang":"en","description":"CWE-noinfo Not enough information"}]}],"metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":4.7,"attackVector":"LOCAL","baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"HIGH","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"NONE"}},{"other":{"type":"ssvc","content":{"timestamp":"2024-06-24T19:01:51.855547Z","id":"CVE-2024-36977","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"title":"CISA ADP Vulnrichment","providerMetadata":{"orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP","dateUpdated":"2024-11-01T14:56:58.197Z"}},{"providerMetadata":{"orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE","dateUpdated":"2024-08-02T03:43:50.431Z"},"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/341eb08dbca9eae05308c442fbfab1813a44c97a","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/ec96bcf5f96a7a5c556b0e881ac3e5c3924d542c","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/4a387e032909c6dc2b479452c5bbe9a252057925","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/1ba145f05b5c8f0b1a947a0633b5edff5dd1f1c5","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/1d26ba0944d398f88aaf997bda3544646cf21945","tags":["x_transferred"]}]}]}}