CVE-2024-42085

Medium

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.

Package Linux Kernel
Published 2024-07-29
Last modified 2025-11-03
CVSS version 3.1
Patch available
Yes

CVSS 3.1 score

5.5

out of 10
Medium
Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
High
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Weakness type

CWE-667

CVE-2024-42085 is a Improper Locking vulnerability

What is Improper Locking?

The product does not properly acquire or release a lock, which can lead to unexpected behaviour. Learn more on MITRE CWE

Affected versions

Linux kernel versions 5.15.128, 6.1 and later are affected. Fixed in 5.15.162, 6.1.97, 6.6.37, 6.9.8, 6.10 and their respective stable series.

Affected from
≥ 5.15.128 ≥ 6.1
Fixed in
✓ 5.15.162 5.15.x ✓ 6.1.97 6.1.x ✓ 6.6.37 6.6.x ✓ 6.9.8 6.9.x ✓ 6.10

Frequently asked questions

  • What is CVE-2024-42085?

    CVE-2024-42085 is a Medium severity Linux kernel vulnerability with a CVSS score of 5.5 out of 10 , classified as an Improper Locking flaw (CWE-667) . It affects Linux kernel versions from 5.15.128 onward and has been patched in 5.15.162, 6.1.97, 6.6.37 and others. CVE-2024-42085 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.

  • What is the CVSS score for CVE-2024-42085?

    CVE-2024-42085 has a CVSS score of 5.5 out of 10, rated Medium severity (CVSS 3.1). The vector string is CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H .

  • Is there a patch available for CVE-2024-42085?

    Yes. CVE-2024-42085 has been patched. Fixed versions include 5.15.162, 6.1.97, 6.6.37 and others. If you are running Linux kernel 5.15.128 or later up to the fix versions, apply the relevant patch for your kernel branch.

  • Is CVE-2024-42085 actively exploited?

    No. CVE-2024-42085 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.