{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-42085",
  "modified": "2026-10-07T17:22:01Z",
  "upstream": [
    "CVE-2024-42085"
  ],
  "published": "2024-07-29T16:26:53Z",
  "summary": "usb: dwc3: core: remove lock of otg mode during gadget suspend/resume to avoid deadlock",
  "details": "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.",
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.47-1+rpt4",
        "1:6.1.54-1+rpt2",
        "1:6.1.58-1+rpt2",
        "1:6.1.63-1+rpt1",
        "1:6.1.73-1+rpt1",
        "1:6.6.20-1+rpt1",
        "1:6.6.28-1+rpt1",
        "1:6.6.31-1+rpt1"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-2712",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v6",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7l",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v8",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi4-rpi-2712",
            "binary_version": "1:6.1.54-1+rpt2"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi4-rpi-v8",
            "binary_version": "1:6.1.54-1+rpt2"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi6-rpi-2712",
            "binary_version": "1:6.1.58-1+rpt2"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi6-rpi-v8",
            "binary_version": "1:6.1.58-1+rpt2"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi7-rpi-2712",
            "binary_version": "1:6.1.63-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi7-rpi-v8",
            "binary_version": "1:6.1.63-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi8-rpi-2712",
            "binary_version": "1:6.1.73-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi8-rpi-v8",
            "binary_version": "1:6.1.73-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.20+rpt-rpi-2712",
            "binary_version": "1:6.6.20-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.20+rpt-rpi-v8",
            "binary_version": "1:6.6.20-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.28+rpt-rpi-2712",
            "binary_version": "1:6.6.28-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.28+rpt-rpi-v8",
            "binary_version": "1:6.6.28-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.31+rpt-rpi-2712",
            "binary_version": "1:6.6.31-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.31+rpt-rpi-v8",
            "binary_version": "1:6.6.31-1+rpt1"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.47-1+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.97",
            "compiled_filter": false
          },
          "1:6.1.54-1+rpt2": {
            "linux_commit": "2906f7abdc03d4a92b6b0e2e0c87ea2a9dffe8f7",
            "upstream_version": "6.1.54",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.97"
          },
          "1:6.1.58-1+rpt2": {
            "linux_commit": "ccf1586ad0663fa91238ac56abf6340d6d740d18",
            "upstream_version": "6.1.58",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.97"
          },
          "1:6.1.63-1+rpt1": {
            "linux_commit": null,
            "upstream_version": "6.1.63",
            "assessment": "upstream version (no usable Linux commit)",
            "upstream_fixed": "6.1.97"
          },
          "1:6.1.73-1+rpt1": {
            "linux_commit": null,
            "upstream_version": "6.1.73",
            "assessment": "upstream version (no usable Linux commit)",
            "upstream_fixed": "6.1.97"
          },
          "1:6.6.20-1+rpt1": {
            "linux_commit": "6f16847710cc0502450788b9f12f0a14d3429668",
            "upstream_version": "6.6.20",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.6.37"
          },
          "1:6.6.28-1+rpt1": {
            "linux_commit": "0c341f47adc3578cd5f817aa20ee2b7f9ae6b23e",
            "upstream_version": "6.6.28",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.6.37"
          },
          "1:6.6.31-1+rpt1": {
            "linux_commit": "c1432b4bae5b6582f4d32ba381459f33c34d1424",
            "upstream_version": "6.6.31",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.6.37"
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-42085"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/8731a0b180f6b5d52397c7aeea6eda9511a467a7"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/7026576e89094aa9a0062aa6d10cba18aa99944c"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/d77e2b5104c51d3668b9717c825a4a06998efe63"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/17e2956633ca560b95f1cbbb297cfc2adf650649"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/f1274cfab183e69a7c7bafffcb4f50703c876276"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/7838de15bb700c2898a7d741db9b1f3cbc86c136"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-05-24T06:48:58Z"
  }
}
