CVE-2024-38628 (GCVE-0-2024-38628)
Vulnerability from cvelistv5
Published
2024-06-21 10:18
Modified
2026-08-05 11:33
Summary
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: u_audio: Fix race condition use of controls after free during gadget unbind. Hang on to the control IDs instead of pointers since those are correctly handled with locks.
Impacted products
Vendor Product Version
Linux Linux Version: 02de698ca8123782c0c6fb8ed99080e2f032b0d2
Version: 02de698ca8123782c0c6fb8ed99080e2f032b0d2
Version: 02de698ca8123782c0c6fb8ed99080e2f032b0d2
Version: 02de698ca8123782c0c6fb8ed99080e2f032b0d2
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "cvssV3_1": {
              "attackComplexity": "LOW",
              "attackVector": "LOCAL",
              "availabilityImpact": "HIGH",
              "baseScore": 5.5,
              "baseSeverity": "MEDIUM",
              "confidentialityImpact": "NONE",
              "integrityImpact": "NONE",
              "privilegesRequired": "LOW",
              "scope": "UNCHANGED",
              "userInteraction": "NONE",
              "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
              "version": "3.1"
            }
          },
          {
            "other": {
              "content": {
                "id": "CVE-2024-38628",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-06-24T15:20:09.528911Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "problemTypes": [
          {
            "descriptions": [
              {
                "cweId": "CWE-362",
                "description": "CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization (\u0027Race Condition\u0027)",
                "lang": "en",
                "type": "CWE"
              }
            ]
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-11-05T16:32:35.156Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T04:12:26.065Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/89e66809684485590ea0b32c3178e42cba36ac09"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/453d3fa9266e53f85377b911c19b9a4563fa88c0"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/bea73b58ab67fe581037ad9cdb93c2557590c068"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/1b739388aa3f8dfb63a9fca777e6dfa6912d0464"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/usb/gadget/function/u_audio.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "89e66809684485590ea0b32c3178e42cba36ac09",
              "status": "affected",
              "version": "02de698ca8123782c0c6fb8ed99080e2f032b0d2",
              "versionType": "git"
            },
            {
              "lessThan": "453d3fa9266e53f85377b911c19b9a4563fa88c0",
              "status": "affected",
              "version": "02de698ca8123782c0c6fb8ed99080e2f032b0d2",
              "versionType": "git"
            },
            {
              "lessThan": "bea73b58ab67fe581037ad9cdb93c2557590c068",
              "status": "affected",
              "version": "02de698ca8123782c0c6fb8ed99080e2f032b0d2",
              "versionType": "git"
            },
            {
              "lessThan": "1b739388aa3f8dfb63a9fca777e6dfa6912d0464",
              "status": "affected",
              "version": "02de698ca8123782c0c6fb8ed99080e2f032b0d2",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/usb/gadget/function/u_audio.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.15"
            },
            {
              "lessThan": "5.15",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.93",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.33",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.9.*",
              "status": "unaffected",
              "version": "6.9.4",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.10",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.93",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.33",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.9.4",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.10",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: u_audio: Fix race condition use of controls after free during gadget unbind.\n\nHang on to the control IDs instead of pointers since those are correctly\nhandled with locks."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The free side of the race is driven by local gadget teardown (`configfs` UDC unbind / `afunc_unbind` \u2192 `g_audio_cleanup`) and by the userspace close of the ALSA control fd that gates the deferred `snd_card_free_when_closed()`, while the use side is reachable locally through `dummy_hcd`/`raw-gadget` acting as an in-software USB host. This matches established kernel.org scoring for USB gadget bind/unbind use-after-frees (e.g. CVE-2025-38555, CVE-2026-63894).\nAC:L - The attacker controls both sides of the race \u2014 the moment of the free (unbind plus closing the last `/dev/snd/control*` descriptor, which is what actually triggers `snd_card_do_free()` and releases the kcontrols) and the moment of the use (UAC volume/mute `SET_CUR` transfers, altsetting changes, or bus suspend) \u2014 so it can be retried and won reliably.\nPR:L - An unprivileged local user can hold and release the ALSA control descriptor to pin the exact instant the kcontrols are freed and can drive the USB-side control transfers via the loopback host stack, consistent with the PR:L assigned to other gadget teardown use-after-frees reached through the same configfs path.\nUI:N - The attacker performs every step itself \u2014 unbind, fd close, and the UAC control traffic \u2014 with no action required from any other user.\nS:U - The use-after-free corrupts kernel heap memory within the same kernel security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The stale `snd_kcontrol` is read after free and its `id` field (including the 64-byte name) is copied into a `snd_ctl_event` delivered to userspace readers of the control device, leaking groomable freed slab contents; a controlled use-after-free read of this kind is a general kernel memory disclosure primitive.\nI:H - `set_active()` and `u_audio_set_volume/mute()` acquire `prm-\u003elock` and write `prm-\u003eactive`/`volume`/`mute` into the already-`kfree()`d `snd_uac_chip`, and `snd_ctl_notify()` performs list insertion on the freed `snd_card`, giving write-after-free and list-corruption primitives that can be leveraged for control-flow hijacking.\nA:H - Use of freed kcontrol, `snd_card`, and `snd_uac_chip` objects \u2014 including spinlock operations and list walks on freed memory \u2014 reliably produces KASAN splats, list corruption, and kernel panics."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T11:33:16.721Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/89e66809684485590ea0b32c3178e42cba36ac09"
        },
        {
          "url": "https://git.kernel.org/stable/c/453d3fa9266e53f85377b911c19b9a4563fa88c0"
        },
        {
          "url": "https://git.kernel.org/stable/c/bea73b58ab67fe581037ad9cdb93c2557590c068"
        },
        {
          "url": "https://git.kernel.org/stable/c/1b739388aa3f8dfb63a9fca777e6dfa6912d0464"
        }
      ],
      "title": "usb: gadget: u_audio: Fix race condition use of controls after free during gadget unbind.",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-38628",
    "datePublished": "2024-06-21T10:18:19.558Z",
    "dateReserved": "2024-06-18T19:36:34.946Z",
    "dateUpdated": "2026-08-05T11:33:16.721Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CVE Program Container\", \"references\": [{\"url\": \"https://git.kernel.org/stable/c/89e66809684485590ea0b32c3178e42cba36ac09\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/453d3fa9266e53f85377b911c19b9a4563fa88c0\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/bea73b58ab67fe581037ad9cdb93c2557590c068\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/1b739388aa3f8dfb63a9fca777e6dfa6912d0464\", \"tags\": [\"x_transferred\"]}], \"providerMetadata\": {\"orgId\": \"af854a3a-2127-422b-91ae-364da2661108\", \"shortName\": \"CVE\", \"dateUpdated\": \"2024-08-02T04:12:26.065Z\"}}, {\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"cvssV3_1\": {\"scope\": \"UNCHANGED\", \"version\": \"3.1\", \"baseScore\": 5.5, \"attackVector\": \"LOCAL\", \"baseSeverity\": \"MEDIUM\", \"vectorString\": \"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H\", \"integrityImpact\": \"NONE\", \"userInteraction\": \"NONE\", \"attackComplexity\": \"LOW\", \"availabilityImpact\": \"HIGH\", \"privilegesRequired\": \"LOW\", \"confidentialityImpact\": \"NONE\"}}, {\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-38628\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-06-24T15:20:09.528911Z\"}}}], \"problemTypes\": [{\"descriptions\": [{\"lang\": \"en\", \"type\": \"CWE\", \"cweId\": \"CWE-362\", \"description\": \"CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization (\u0027Race Condition\u0027)\"}]}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-06-24T15:20:28.195Z\"}}], \"cna\": {\"title\": \"usb: gadget: u_audio: Fix race condition use of controls after free during gadget unbind.\", \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"02de698ca8123782c0c6fb8ed99080e2f032b0d2\", \"lessThan\": \"89e66809684485590ea0b32c3178e42cba36ac09\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"02de698ca8123782c0c6fb8ed99080e2f032b0d2\", \"lessThan\": \"453d3fa9266e53f85377b911c19b9a4563fa88c0\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"02de698ca8123782c0c6fb8ed99080e2f032b0d2\", \"lessThan\": \"bea73b58ab67fe581037ad9cdb93c2557590c068\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"02de698ca8123782c0c6fb8ed99080e2f032b0d2\", \"lessThan\": \"1b739388aa3f8dfb63a9fca777e6dfa6912d0464\", \"versionType\": \"git\"}], \"programFiles\": [\"drivers/usb/gadget/function/u_audio.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"5.15\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"5.15\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"6.1.93\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.1.*\"}, {\"status\": \"unaffected\", \"version\": \"6.6.33\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.6.*\"}, {\"status\": \"unaffected\", \"version\": \"6.9.4\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.9.*\"}, {\"status\": \"unaffected\", \"version\": \"6.10\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"drivers/usb/gadget/function/u_audio.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/89e66809684485590ea0b32c3178e42cba36ac09\"}, {\"url\": \"https://git.kernel.org/stable/c/453d3fa9266e53f85377b911c19b9a4563fa88c0\"}, {\"url\": \"https://git.kernel.org/stable/c/bea73b58ab67fe581037ad9cdb93c2557590c068\"}, {\"url\": \"https://git.kernel.org/stable/c/1b739388aa3f8dfb63a9fca777e6dfa6912d0464\"}], \"x_generator\": {\"engine\": \"bippy-1.2.0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nusb: gadget: u_audio: Fix race condition use of controls after free during gadget unbind.\\n\\nHang on to the control IDs instead of pointers since those are correctly\\nhandled with locks.\"}], \"cpeApplicability\": [{\"nodes\": [{\"negate\": false, \"cpeMatch\": [{\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.1.93\", \"versionStartIncluding\": \"5.15\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.6.33\", \"versionStartIncluding\": \"5.15\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.9.4\", \"versionStartIncluding\": \"5.15\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.10\", \"versionStartIncluding\": \"5.15\"}], \"operator\": \"OR\"}]}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2026-05-11T20:20:27.499Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2024-38628\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2026-05-11T20:20:27.499Z\", \"dateReserved\": \"2024-06-18T19:36:34.946Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-06-21T10:18:19.558Z\", \"assignerShortName\": \"Linux\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…