{"id":"CVE-2024-42085","aliases":["CVE-2024-42085"],"related":[],"kind":"vulnerability","state":"published","title":"usb: dwc3: core: remove lock of otg mode during gadget suspend/resume to avoid deadlock","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: dwc3: core: remove lock of otg mode during gadget suspend/resume to avoid deadlock\n\nWhen config CONFIG_USB_DWC3_DUAL_ROLE is selected, and trigger system\nto enter suspend status with below command:\necho mem > /sys/power/state\nThere will be a deadlock issue occurring. Detailed invoking path as\nbelow:\ndwc3_suspend_common()\n    spin_lock_irqsave(&dwc->lock, flags);              <-- 1st\n    dwc3_gadget_suspend(dwc);\n        dwc3_gadget_soft_disconnect(dwc);\n            spin_lock_irqsave(&dwc->lock, flags);      <-- 2nd\nThis issue is exposed by commit c7ebd8149ee5 (\"usb: dwc3: gadget: Fix\nNULL pointer dereference in dwc3_gadget_suspend\") that removes the code\nof checking whether dwc->gadget_driver is NULL or not. It causes the\nfollowing code is executed and deadlock occurs when trying to get the\nspinlock. In fact, the root cause is the commit 5265397f9442(\"usb: dwc3:\nRemove DWC3 locking during gadget suspend/resume\") that forgot to remove\nthe lock of otg mode. So, remove the redundant lock of otg mode during\ngadget suspend/resume.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: dwc3: core: remove lock of otg mode during gadget suspend/resume to avoid deadlock\n\nWhen config CONFIG_USB_DWC3_DUAL_ROLE is selected, and trigger system\nto enter suspend status with below command:\necho mem > /sys/power/state\nThere will be a deadlock issue occurring. Detailed invoking path as\nbelow:\ndwc3_suspend_common()\n    spin_lock_irqsave(&dwc->lock, flags);              <-- 1st\n    dwc3_gadget_suspend(dwc);\n        dwc3_gadget_soft_disconnect(dwc);\n            spin_lock_irqsave(&dwc->lock, flags);      <-- 2nd\nThis issue is exposed by commit c7ebd8149ee5 (\"usb: dwc3: gadget: Fix\nNULL pointer dereference in dwc3_gadget_suspend\") that removes the code\nof checking whether dwc->gadget_driver is NULL or not. It causes the\nfollowing code is executed and deadlock occurs when trying to get the\nspinlock. In fact, the root cause is the commit 5265397f9442(\"usb: dwc3:\nRemove DWC3 locking during gadget suspend/resume\") that forgot to remove\nthe lock of otg mode. So, remove the redundant lock of otg mode during\ngadget suspend/resume.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: usb: dwc3: core: elimina el bloqueo del modo otg durante la suspensión/reanudación del dispositivo para evitar un punto muerto Cuando se selecciona config CONFIG_USB_DWC3_DUAL_ROLE y activa el sistema para que entre en estado de suspensión con el siguiente comando: echo mem &gt; /sys/power/state Se producirá un problema de interbloqueo. Ruta de invocación detallada como se muestra a continuación: dwc3_suspend_common() spin_lock_irqsave(&amp;dwc-&gt;lock, flags); &lt;-- 1er dwc3_gadget_suspend(dwc); dwc3_gadget_soft_disconnect(dwc); spin_lock_irqsave(&amp;dwc-&gt;bloquear, banderas); &lt;-- 2.º Este problema se expone mediante la confirmación c7ebd8149ee5 (\"usb: dwc3: gadget: Fix NULL pointer dereference in dwc3_gadget_suspend\") que elimina el código para verificar si dwc-&gt;gadget_driver es NULL o no. Hace que se ejecute el siguiente código y se produzca un punto muerto al intentar obtener el bloqueo de giro. De hecho, la causa principal es la confirmación 5265397f9442(\"usb: dwc3: Eliminar el bloqueo de DWC3 durante la suspensión/reanudación del dispositivo\") que olvidó eliminar el bloqueo del modo otg. Por lo tanto, elimine el bloqueo redundante del modo otg durante la suspensión/reanudación del dispositivo.","source":"nvd"}],"published":"2024-07-29T16:26:26.284Z","modified":"2026-06-17T07:48:46.667Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-667"],"affected":[{"ranges":[{"type":"git","introduced":"f2bfd0a2a640ca2f308b6893a89cfb2ec31e8fde","fixed":"8731a0b180f6b5d52397c7aeea6eda9511a467a7","status":"affected"},{"type":"git","introduced":"2fa487a9466760a4fb6f147aed6219379dabfc2e","fixed":"7026576e89094aa9a0062aa6d10cba18aa99944c","status":"affected"},{"type":"git","introduced":"5265397f94424eaea596026fd34dc7acf474dcec","fixed":"d77e2b5104c51d3668b9717c825a4a06998efe63","status":"affected"},{"type":"git","introduced":"5265397f94424eaea596026fd34dc7acf474dcec","fixed":"17e2956633ca560b95f1cbbb297cfc2adf650649","status":"affected"},{"type":"git","introduced":"5265397f94424eaea596026fd34dc7acf474dcec","fixed":"f1274cfab183e69a7c7bafffcb4f50703c876276","status":"affected"},{"type":"git","introduced":"5265397f94424eaea596026fd34dc7acf474dcec","fixed":"7838de15bb700c2898a7d741db9b1f3cbc86c136","status":"affected"},{"type":"semver","introduced":"5.15.128","fixed":"5.15.162","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.1","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.1","status":"unaffected"},{"type":"semver","introduced":"5.15.162","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.97","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.37","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.9.8","lastAffected":"6.9.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.10","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.15.128","fixed":"5.15.162"},{"status":"affected","introduced":"6.1","fixed":"6.1.97"},{"status":"affected","introduced":"6.2","fixed":"6.6.37"},{"status":"affected","introduced":"6.7","fixed":"6.9.8"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/8731a0b180f6b5d52397c7aeea6eda9511a467a7","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7026576e89094aa9a0062aa6d10cba18aa99944c","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d77e2b5104c51d3668b9717c825a4a06998efe63","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/17e2956633ca560b95f1cbbb297cfc2adf650649","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f1274cfab183e69a7c7bafffcb4f50703c876276","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7838de15bb700c2898a7d741db9b1f3cbc86c136","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-10T16:18:57.338Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-42085","url":"https://www.cve.org/CVERecord?id=CVE-2024-42085","licence":"CVE Terms of Use","modified":"2026-05-23T15:51:58.161Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-42085","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-42085","licence":"Public domain","modified":"2026-06-17T07:48:46.667Z"}],"updatedAt":"2026-11-25T22:58:43.345Z","epss":{"score":0.00178,"percentile":0.07712,"date":"2026-12-01T12:00:22.000Z"}}