CVE-2025-39997 (GCVE-0-2025-39997)

Vulnerability from cvelistv5 – Published: 2025-10-15 07:58 – Updated: 2026-10-15 01:08
VLAI
Title
ALSA: usb-audio: fix race condition to UAF in snd_usbmidi_free
Summary
In the Linux kernel, the following vulnerability has been resolved: ALSA: usb-audio: fix race condition to UAF in snd_usbmidi_free The previous commit 0718a78f6a9f ("ALSA: usb-audio: Kill timer properly at removal") patched a UAF issue caused by the error timer. However, because the error timer kill added in this patch occurs after the endpoint delete, a race condition to UAF still occurs, albeit rarely. Additionally, since kill-cleanup for urb is also missing, freed memory can be accessed in interrupt context related to urb, which can cause UAF. Therefore, to prevent this, error timer and urb must be killed before freeing the heap memory.
Severity
No CVSS data available.
Assigner
Linux CNA under the mitre root
CNA scorecard D 53/100 over 7143 records in the last 180 days details
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 06513dd6d32c37d0364db8488cfdf3e14da238a8 , < e63f049c7764b615d1d50cb486745fa63372b42d (git)
Affected: efaf61052b8ff9ee8968912fbaf02c2847c78ede , < e16985513e89466a236d2a7c202783b4dd0c5a46 (git)
Affected: 647410a7da46067953a53c0d03f8680eff570959 , < dc4874366cf6cf4a31d8fa4b7f0e2a5b2d7647ba (git)
Affected: c611b9e55174e439dcd85a72969b43a95f3827a4 , < 647d6b8d22be12842fde6ed0c56859ebc615f21e (git)
Affected: 0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1 , < af600e7f5526d16146b3ae99f6ad57bfea79ca33 (git)
Affected: 0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1 , < 353d8c715cc951a980728133c9dd64ca5a0a186c (git)
Affected: 0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1 , < 9f2c0ac1423d5f267e7f1d1940780fc764b0fee3 (git)
Affected: 62066758d2ae169278e5d6aea5995b1b6f6ddeb5 (git)
Affected: 6.1.167 , < 6.1.175 (semver)
Affected: 6.15.3 , < 6.16 (semver)
guessed Create a notification for this product.
Linux Linux Affected: 6.16
Unaffected: 0 , < 6.16 (semver)
Unaffected: 6.1.175 , ≤ 6.1.* (semver)
Unaffected: 6.16.11 , ≤ 6.16.* (semver)
Unaffected: 6.17.1 , ≤ 6.17.* (semver)
Unaffected: 6.18 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Siemens SIMATIC S7-1500 TM MFP - GNU/Linux subsystem Affected: 0 , < * (custom)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "affected": [
          {
            "defaultStatus": "unknown",
            "product": "SIMATIC S7-1500 TM MFP - GNU/Linux subsystem",
            "vendor": "Siemens",
            "versions": [
              {
                "lessThan": "*",
                "status": "affected",
                "version": "0",
                "versionType": "custom"
              }
            ]
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2026-10-15T01:08:48.788Z",
          "orgId": "0b142b55-0307-4c5a-b3c9-f314f3fb7c5e",
          "shortName": "siemens-SADP"
        },
        "references": [
          {
            "url": "https://cert-portal.siemens.com/productcert/html/ssa-784472.html"
          }
        ],
        "x_adpType": "supplier"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "sound/usb/midi.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "e63f049c7764b615d1d50cb486745fa63372b42d",
              "status": "affected",
              "version": "06513dd6d32c37d0364db8488cfdf3e14da238a8",
              "versionType": "git"
            },
            {
              "lessThan": "e16985513e89466a236d2a7c202783b4dd0c5a46",
              "status": "affected",
              "version": "efaf61052b8ff9ee8968912fbaf02c2847c78ede",
              "versionType": "git"
            },
            {
              "lessThan": "dc4874366cf6cf4a31d8fa4b7f0e2a5b2d7647ba",
              "status": "affected",
              "version": "647410a7da46067953a53c0d03f8680eff570959",
              "versionType": "git"
            },
            {
              "lessThan": "647d6b8d22be12842fde6ed0c56859ebc615f21e",
              "status": "affected",
              "version": "c611b9e55174e439dcd85a72969b43a95f3827a4",
              "versionType": "git"
            },
            {
              "lessThan": "af600e7f5526d16146b3ae99f6ad57bfea79ca33",
              "status": "affected",
              "version": "0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1",
              "versionType": "git"
            },
            {
              "lessThan": "353d8c715cc951a980728133c9dd64ca5a0a186c",
              "status": "affected",
              "version": "0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1",
              "versionType": "git"
            },
            {
              "lessThan": "9f2c0ac1423d5f267e7f1d1940780fc764b0fee3",
              "status": "affected",
              "version": "0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "62066758d2ae169278e5d6aea5995b1b6f6ddeb5",
              "versionType": "git"
            },
            {
              "lessThan": "6.1.175",
              "status": "affected",
              "version": "6.1.167",
              "versionType": "semver"
            },
            {
              "lessThan": "6.16",
              "status": "affected",
              "version": "6.15.3",
              "versionType": "semver"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "sound/usb/midi.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.16"
            },
            {
              "lessThan": "6.16",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.175",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.16.*",
              "status": "unaffected",
              "version": "6.16.11",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.17.*",
              "status": "unaffected",
              "version": "6.17.1",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.18",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.175",
                  "versionStartIncluding": "6.1.167",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.16.11",
                  "versionStartIncluding": "6.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.17.1",
                  "versionStartIncluding": "6.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18",
                  "versionStartIncluding": "6.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionStartIncluding": "6.15.3",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nALSA: usb-audio: fix race condition to UAF in snd_usbmidi_free\n\nThe previous commit 0718a78f6a9f (\"ALSA: usb-audio: Kill timer properly at\nremoval\") patched a UAF issue caused by the error timer.\n\nHowever, because the error timer kill added in this patch occurs after the\nendpoint delete, a race condition to UAF still occurs, albeit rarely.\n\nAdditionally, since kill-cleanup for urb is also missing, freed memory can\nbe accessed in interrupt context related to urb, which can cause UAF.\n\nTherefore, to prevent this, error timer and urb must be killed before\nfreeing the heap memory."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-06-01T16:05:31.937Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/e63f049c7764b615d1d50cb486745fa63372b42d"
        },
        {
          "url": "https://git.kernel.org/stable/c/e16985513e89466a236d2a7c202783b4dd0c5a46"
        },
        {
          "url": "https://git.kernel.org/stable/c/dc4874366cf6cf4a31d8fa4b7f0e2a5b2d7647ba"
        },
        {
          "url": "https://git.kernel.org/stable/c/647d6b8d22be12842fde6ed0c56859ebc615f21e"
        },
        {
          "url": "https://git.kernel.org/stable/c/af600e7f5526d16146b3ae99f6ad57bfea79ca33"
        },
        {
          "url": "https://git.kernel.org/stable/c/353d8c715cc951a980728133c9dd64ca5a0a186c"
        },
        {
          "url": "https://git.kernel.org/stable/c/9f2c0ac1423d5f267e7f1d1940780fc764b0fee3"
        }
      ],
      "title": "ALSA: usb-audio: fix race condition to UAF in snd_usbmidi_free",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-39997",
    "datePublished": "2025-10-15T07:58:21.702Z",
    "dateReserved": "2025-04-16T07:20:57.151Z",
    "dateUpdated": "2026-10-15T01:08:48.788Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-39997",
      "date": "2026-11-19",
      "epss": "0.00211",
      "percentile": "0.11487"
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "defaultStatus": "unaffected",
                "product": "Linux",
                "programFiles": [
                  "sound/usb/midi.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "lessThan": "e63f049c7764b615d1d50cb486745fa63372b42d",
                    "status": "affected",
                    "version": "06513dd6d32c37d0364db8488cfdf3e14da238a8",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "e16985513e89466a236d2a7c202783b4dd0c5a46",
                    "status": "affected",
                    "version": "efaf61052b8ff9ee8968912fbaf02c2847c78ede",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "dc4874366cf6cf4a31d8fa4b7f0e2a5b2d7647ba",
                    "status": "affected",
                    "version": "647410a7da46067953a53c0d03f8680eff570959",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "647d6b8d22be12842fde6ed0c56859ebc615f21e",
                    "status": "affected",
                    "version": "c611b9e55174e439dcd85a72969b43a95f3827a4",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "af600e7f5526d16146b3ae99f6ad57bfea79ca33",
                    "status": "affected",
                    "version": "0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "353d8c715cc951a980728133c9dd64ca5a0a186c",
                    "status": "affected",
                    "version": "0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "9f2c0ac1423d5f267e7f1d1940780fc764b0fee3",
                    "status": "affected",
                    "version": "0718a78f6a9f04b88d0dc9616cc216b31c5f3cf1",
                    "versionType": "git"
                  },
                  {
                    "status": "affected",
                    "version": "62066758d2ae169278e5d6aea5995b1b6f6ddeb5",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "6.1.175",
                    "status": "affected",
                    "version": "6.1.167",
                    "versionType": "semver"
                  },
                  {
                    "lessThan": "6.16",
                    "status": "affected",
                    "version": "6.15.3",
                    "versionType": "semver"
                  }
                ]
              },
              {
                "defaultStatus": "affected",
                "product": "Linux",
                "programFiles": [
                  "sound/usb/midi.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "status": "affected",
                    "version": "6.16"
                  },
                  {
                    "lessThan": "6.16",
                    "status": "unaffected",
                    "version": "0",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.1.*",
                    "status": "unaffected",
                    "version": "6.1.175",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.16.*",
                    "status": "unaffected",
                    "version": "6.16.11",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.17.*",
                    "status": "unaffected",
                    "version": "6.17.1",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "*",
                    "status": "unaffected",
                    "version": "6.18",
                    "versionType": "original_commit_for_fix"
                  }
                ]
              }
            ],
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
          },
          {
            "affectedData": [
              {
                "defaultStatus": "unknown",
                "product": "SIMATIC S7-1500 TM MFP - GNU/Linux subsystem",
                "vendor": "Siemens",
                "versions": [
                  {
                    "lessThan": "*",
                    "status": "affected",
                    "version": "0",
                    "versionType": "custom"
                  }
                ]
              }
            ],
            "source": "0b142b55-0307-4c5a-b3c9-f314f3fb7c5e"
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nALSA: usb-audio: fix race condition to UAF in snd_usbmidi_free\n\nThe previous commit 0718a78f6a9f (\"ALSA: usb-audio: Kill timer properly at\nremoval\") patched a UAF issue caused by the error timer.\n\nHowever, because the error timer kill added in this patch occurs after the\nendpoint delete, a race condition to UAF still occurs, albeit rarely.\n\nAdditionally, since kill-cleanup for urb is also missing, freed memory can\nbe accessed in interrupt context related to urb, which can cause UAF.\n\nTherefore, to prevent this, error timer and urb must be killed before\nfreeing the heap memory."
          },
          {
            "lang": "es",
            "value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nALSA: usb-audio: corregir condici\u00f3n de carrera a UAF en snd_usbmidi_free\n\nEl commit anterior 0718a78f6a9f (\u0027ALSA: usb-audio: Eliminar temporizador correctamente al retirar\u0027) parche\u00f3 un problema de UAF causado por el temporizador de error.\n\nSin embargo, debido a que la eliminaci\u00f3n del temporizador de error a\u00f1adida en este parche ocurre despu\u00e9s de la eliminaci\u00f3n del punto final, una condici\u00f3n de carrera a UAF todav\u00eda ocurre, aunque raramente.\n\nAdem\u00e1s, dado que la limpieza de eliminaci\u00f3n para urb tambi\u00e9n falta, la memoria liberada puede ser accedida en contexto de interrupci\u00f3n relacionado con urb, lo que puede causar UAF.\n\nPor lo tanto, para prevenir esto, el temporizador de error y urb deben ser eliminados antes de liberar la memoria del mont\u00f3n."
          }
        ],
        "id": "CVE-2025-39997",
        "lastModified": "2026-10-19T21:10:00.160",
        "metrics": {},
        "published": "2025-10-15T08:15:37.947",
        "references": [
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/353d8c715cc951a980728133c9dd64ca5a0a186c"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/647d6b8d22be12842fde6ed0c56859ebc615f21e"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/9f2c0ac1423d5f267e7f1d1940780fc764b0fee3"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/af600e7f5526d16146b3ae99f6ad57bfea79ca33"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/dc4874366cf6cf4a31d8fa4b7f0e2a5b2d7647ba"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/e16985513e89466a236d2a7c202783b4dd0c5a46"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/e63f049c7764b615d1d50cb486745fa63372b42d"
          },
          {
            "source": "0b142b55-0307-4c5a-b3c9-f314f3fb7c5e",
            "url": "https://cert-portal.siemens.com/productcert/html/ssa-784472.html"
          }
        ],
        "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "vulnStatus": "Deferred"
      }
    },
    "redhat_vex": {
      "aggregate_severity": "Low",
      "current_release_date": "2026-11-07T11:02:25+00:00",
      "cve": "CVE-2025-39997",
      "id": "CVE-2025-39997",
      "initial_release_date": "2025-10-15T00:00:00+00:00",
      "product_status:known_affected": "1",
      "product_status:known_not_affected": "199",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: Linux kernel: Use-After-Free in ALSA USB audio due to race condition",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-39997.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-11-05T01:34:02Z",
      "cve": "CVE-2025-39997",
      "id": "CVE-2025-39997",
      "initial_release_date": "2025-10-16T23:24:05Z",
      "product_status:known_affected": "401",
      "product_status:known_not_affected": "330",
      "product_status:recommended": "538",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2025-39997",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/2025/cve-2025-39997.json",
      "version": "52"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.