# CVE-2024-42085: usb: dwc3: core: remove lock of otg mode during gadget suspend/resume to avoid deadlock

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.23% (percentile 9, 2026-11-26)
- **CWE:** CWE-667
- **Published:** 2024-07-29T16:26:26.284Z
- **Modified:** 2026-06-17T07:48:46.667Z

## Who should check

- Anyone running Linux \>= f2bfd0a2a640ca2f308b6893a89cfb2ec31e8fde, \< 8731a0b180f6b5d52397c7aeea6eda9511a467a7; \>= 2fa487a9466760a4fb6f147aed6219379dabfc2e, \< 7026576e89094aa9a0062aa6d10cba18aa99944c; \>= 5265397f94424eaea596026fd34dc7acf474dcec, \< d77e2b5104c51d3668b9717c825a4a06998efe63; \>= 5265397f94424eaea596026fd34dc7acf474dcec, \< 17e2956633ca560b95f1cbbb297cfc2adf650649; \>= 5265397f94424eaea596026fd34dc7acf474dcec, \< f1274cfab183e69a7c7bafffcb4f50703c876276; \>= 5265397f94424eaea596026fd34dc7acf474dcec, \< 7838de15bb700c2898a7d741db9b1f3cbc86c136; \>= 5.15.128, \< 5.15.162
- Anyone running Linux 6.1

## Description

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

usb: dwc3: core: remove lock of otg mode during gadget suspend/resume to avoid deadlock

When config CONFIG\_USB\_DWC3\_DUAL\_ROLE is selected, and trigger system
to enter suspend status with below command:
echo mem \> /sys/power/state
There will be a deadlock issue occurring. Detailed invoking path as
below:
dwc3\_suspend\_common()
    spin\_lock\_irqsave(&dwc-\>lock, flags);              \<-- 1st
    dwc3\_gadget\_suspend(dwc);
        dwc3\_gadget\_soft\_disconnect(dwc);
            spin\_lock\_irqsave(&dwc-\>lock, flags);      \<-- 2nd
This issue is exposed by commit c7ebd8149ee5 ("usb: dwc3: gadget: Fix
NULL pointer dereference in dwc3\_gadget\_suspend") that removes the code
of checking whether dwc-\>gadget\_driver is NULL or not. It causes the
following code is executed and deadlock occurs when trying to get the
spinlock. In fact, the root cause is the commit 5265397f9442("usb: dwc3:
Remove DWC3 locking during gadget suspend/resume") that forgot to remove
the lock of otg mode. So, remove the redundant lock of otg mode during
gadget suspend/resume.

## Affected and fixed versions

- Linux: \>= f2bfd0a2a640ca2f308b6893a89cfb2ec31e8fde, \< 8731a0b180f6b5d52397c7aeea6eda9511a467a7; \>= 2fa487a9466760a4fb6f147aed6219379dabfc2e, \< 7026576e89094aa9a0062aa6d10cba18aa99944c; \>= 5265397f94424eaea596026fd34dc7acf474dcec, \< d77e2b5104c51d3668b9717c825a4a06998efe63; \>= 5265397f94424eaea596026fd34dc7acf474dcec, \< 17e2956633ca560b95f1cbbb297cfc2adf650649; \>= 5265397f94424eaea596026fd34dc7acf474dcec, \< f1274cfab183e69a7c7bafffcb4f50703c876276; \>= 5265397f94424eaea596026fd34dc7acf474dcec, \< 7838de15bb700c2898a7d741db9b1f3cbc86c136; \>= 5.15.128, \< 5.15.162 (cvelist)
- Linux: 6.1 (cvelist)

## Mitigation

- Upgrade Linux to 5.15.162 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-42085. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-42085.md
Affected: Linux >= f2bfd0a2a640ca2f308b6893a89cfb2ec31e8fde, < 8731a0b180f6b5d52397c7aeea6eda9511a467a7; >= 2fa487a9466760a4fb6f147aed6219379dabfc2e, < 7026576e89094aa9a0062aa6d10cba18aa99944c; >= 5265397f94424eaea596026fd34dc7acf474dcec, < d77e2b5104c51d3668b9717c825a4a06998efe63; >= 5265397f94424eaea596026…
Fixed in: Linux 8731a0b180f6b5d52397c7aeea6eda9511a467a7, Linux 7026576e89094aa9a0062aa6d10cba18aa99944c, Linux 17e2956633ca560b95f1cbbb297cfc2adf650649, Linux 7838de15bb700c2898a7d741db9b1f3cbc86c136, Linux 5.15.162

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-42085 being exploited?

There is no confirmed exploitation: CVE-2024-42085 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.23% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-42085?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-42085?

Linux \>= f2bfd0a2a640ca2f308b6893a89cfb2ec31e8fde, \< 8731a0b180f6b5d52397c7aeea6eda9511a467a7; \>= 2fa487a9466760a4fb6f147aed6219379dabfc2e, \< 7026576e89094aa9a0062aa6d10cba18aa99944c; \>= 5265397f94424eaea596026fd34dc7acf474dcec, \< d77e2b5104c51d3668b9717c825a4a06998efe63; \>= 5265397f94424eaea596026fd34dc7acf474dcec, \< 17e2956633ca560b95f1cbbb297cfc2adf650649; \>= 5265397f94424eaea596026fd34dc7acf474dcec, \< f1274cfab183e69a7c7bafffcb4f50703c876276; \>= 5265397f94424eaea596026fd34dc7acf474dcec, \< 7838de15bb700c2898a7d741db9b1f3cbc86c136; \>= 5.15.128, \< 5.15.162; Linux 6.1.

### Is there a fix for CVE-2024-42085?

Yes. Fixed in Linux 8731a0b180f6b5d52397c7aeea6eda9511a467a7, Linux 7026576e89094aa9a0062aa6d10cba18aa99944c, Linux 17e2956633ca560b95f1cbbb297cfc2adf650649, Linux 7838de15bb700c2898a7d741db9b1f3cbc86c136, Linux 5.15.162. Upgrade Linux to 5.15.162 or later.

### How do I check if I'm affected by CVE-2024-42085?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/7026576e89094aa9a0062aa6d10cba18aa99944c>
- patch: <https://git.kernel.org/stable/c/d77e2b5104c51d3668b9717c825a4a06998efe63>
- patch: <https://git.kernel.org/stable/c/17e2956633ca560b95f1cbbb297cfc2adf650649>
- patch: <https://git.kernel.org/stable/c/f1274cfab183e69a7c7bafffcb4f50703c876276>
- patch: <https://git.kernel.org/stable/c/7838de15bb700c2898a7d741db9b1f3cbc86c136>
- other: <https://git.kernel.org/stable/c/8731a0b180f6b5d52397c7aeea6eda9511a467a7>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-42085>

HTML: <https://flawdb.com/CVE-2024-42085> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-42085>
