{
  "schemaVersion": 1,
  "attribution": [
    {
      "source": "CISA Known Exploited Vulnerabilities",
      "url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog",
      "licence": "US government work"
    },
    {
      "source": "GitHub Advisory Database",
      "url": "https://github.com/advisories",
      "licence": "CC BY 4.0"
    },
    {
      "source": "Have I Been Pwned",
      "url": "https://haveibeenpwned.com/",
      "licence": "CC BY 4.0"
    },
    {
      "source": "CVE Program (CVE records)",
      "url": "https://www.cve.org/Legal/TermsOfUse",
      "licence": "CVE Terms of Use",
      "notice": "Copyright © 1999-2026, The MITRE Corporation. CVE is a trademark and the CVE logo is a registered trademark of The MITRE Corporation.",
      "terms": "CVE Usage: MITRE hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Common Vulnerabilities and Exposures (CVE™). Any copy you make for such purposes is authorized provided that you reproduce MITRE's copyright designation and this license in any such copy."
    },
    {
      "source": "FIRST EPSS",
      "url": "https://www.first.org/epss/",
      "licence": "free to use; FIRST requests attribution"
    }
  ],
  "record": {
    "id": "CVE-2026-64584",
    "sourceURL": "https://www.cve.org/CVERecord?id=CVE-2026-64584",
    "idYear": 2026,
    "status": "PUBLISHED",
    "publishedAt": "2026-08-06T07:06:25.953Z",
    "updatedAt": "2026-08-19T16:29:12.890Z",
    "importedAt": "2026-10-24T01:58:25.636Z",
    "snapshot": {
      "id": "cve_2026-10-24_midnight_baseline",
      "at": "2026-10-24T00:00:00.000Z",
      "source": "https://github.com/CVEProject/cvelistV5/releases/tag/cve_2026-10-24_0100Z"
    },
    "facts": {
      "title": "usb: gadget: f_midi: cancel pending IN work before freeing the midi object",
      "summary": "In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: f_midi: cancel pending IN work before freeing the midi object\n\nThe f_midi driver embeds a work item (midi->work) whose handler,\nf_midi_in_work(), dereferences the enclosing struct f_midi through\ncontainer_of().  This work is armed from two sites: f_midi_complete(),\non a normal IN-endpoint completion, and f_midi_in_trigger(), on an ALSA\nrawmidi output-stream start.\n\nNeither f_midi_disable() nor f_midi_unbind() cancels midi->work.\nf_midi_disable() only disables the endpoints and drains the in_req_fifo;\nit does not synchronize the work item, and the sound card is released\nasynchronously to the final free of the midi object.\n\nThe midi object is reference-counted (midi->free_ref) and is freed in\nf_midi_free() only once both the usb_function reference and the rawmidi\nprivate_data reference have been dropped.  In f_midi_unbind(),\nf_midi_disable() runs before the sound card is released, so while the\nUSB endpoints are already disabled the rawmidi device is still usable by\nan open substream.  A concurrent userspace write on such a substream can\nreach f_midi_in_trigger() and queue midi->work again after\nf_midi_disable() has returned.  A work item armed this way may still be\npending when the last reference drops and f_midi_free() proceeds to\nkfree(midi), letting f_midi_in_work() dereference the struct after it\nhas been freed, a use-after-free.\n\nFor this reason cancelling midi->work in f_midi_disable() would not be\nsufficient: the ALSA trigger path can rearm the work after disable()\nreturns.  Cancelling at the refcount-zero free site is the boundary\nafter which neither arming source can survive, because by then both\nreferences that keep the midi object alive have been dropped: the USB\nendpoints are already disabled and the rawmidi device has been released.\n\nFix this by calling cancel_work_sync(&midi->work) in the refcount-zero\nblock of f_midi_free(), before the embedded work_struct is freed along\nwith the rest of the structure.  opts->lock is a sleeping mutex, so\ncalling cancel_work_sync() under it is permitted, and the handler takes\nmidi->transmit_lock rather than opts->lock, so no self-deadlock can\noccur while it waits for a running instance of the work to finish.\n\nThis issue was found by an in-house static analysis tool.",
      "affected": [
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "unaffected",
          "versions": [
            {
              "version": "3635523e9b96213969693c320302d536774d8e9b",
              "status": "affected",
              "versionType": "git",
              "lessThan": "f3c6f2c38062703d3dc7f86958bb0790c6959add"
            },
            {
              "version": "8653d71ce3763aedcf3d2331f59beda3fecd79e4",
              "status": "affected",
              "versionType": "git",
              "lessThan": "df18150126f66817e4d3f79f309e9c92d6ff384e"
            },
            {
              "version": "8653d71ce3763aedcf3d2331f59beda3fecd79e4",
              "status": "affected",
              "versionType": "git",
              "lessThan": "620955b222c47332297d6bf38f78541aa699238a"
            },
            {
              "version": "8653d71ce3763aedcf3d2331f59beda3fecd79e4",
              "status": "affected",
              "versionType": "git",
              "lessThan": "380b4bef46c2eb260c7a9c6bb2c5be33ce5a38f9"
            },
            {
              "version": "8653d71ce3763aedcf3d2331f59beda3fecd79e4",
              "status": "affected",
              "versionType": "git",
              "lessThan": "87bc316dd6fc90072297c635e10b9aa6075ecda1"
            },
            {
              "version": "8653d71ce3763aedcf3d2331f59beda3fecd79e4",
              "status": "affected",
              "versionType": "git",
              "lessThan": "f45089eaad0a083d71d84ff175741d7e157d9b69"
            },
            {
              "version": "8653d71ce3763aedcf3d2331f59beda3fecd79e4",
              "status": "affected",
              "versionType": "git",
              "lessThan": "ac9a51d910bb7465c554c45320cb6c09f3d0b49d"
            },
            {
              "version": "8653d71ce3763aedcf3d2331f59beda3fecd79e4",
              "status": "affected",
              "versionType": "git",
              "lessThan": "5650c18d93a1db7e27cb5a40b394747eb4686d5b"
            },
            {
              "version": "89019ab7a64fcdf98a2ba7799e5c6aff58d4a05d",
              "status": "affected",
              "versionType": "git"
            },
            {
              "version": "5.10.235",
              "status": "affected",
              "versionType": "semver",
              "lessThan": "5.10.265"
            },
            {
              "version": "5.4.291",
              "status": "affected",
              "versionType": "semver",
              "lessThan": "5.5"
            }
          ]
        },
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "affected",
          "versions": [
            {
              "version": "5.12",
              "status": "affected"
            },
            {
              "version": "0",
              "status": "unaffected",
              "versionType": "semver",
              "lessThan": "5.12"
            },
            {
              "version": "5.10.265",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "5.10.*"
            },
            {
              "version": "5.15.216",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "5.15.*"
            },
            {
              "version": "6.1.183",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.1.*"
            },
            {
              "version": "6.6.148",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.6.*"
            },
            {
              "version": "6.12.101",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.12.*"
            },
            {
              "version": "6.18.42",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.18.*"
            },
            {
              "version": "7.1.6",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "7.1.*"
            },
            {
              "version": "7.2",
              "status": "unaffected",
              "versionType": "original_commit_for_fix",
              "lessThanOrEqual": "*"
            }
          ]
        }
      ]
    }
  }
}