{
  "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-2024-36894",
    "sourceURL": "https://www.cve.org/CVERecord?id=CVE-2024-36894",
    "idYear": 2024,
    "status": "PUBLISHED",
    "publishedAt": "2024-05-30T15:28:59.689Z",
    "updatedAt": "2026-10-15T00:42:38.622Z",
    "importedAt": "2026-10-24T01:57:11.582Z",
    "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_fs: Fix race between aio_cancel() and AIO request complete",
      "summary": "In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: f_fs: Fix race between aio_cancel() and AIO request complete\n\nFFS based applications can utilize the aio_cancel() callback to dequeue\npending USB requests submitted to the UDC.  There is a scenario where the\nFFS application issues an AIO cancel call, while the UDC is handling a\nsoft disconnect.  For a DWC3 based implementation, the callstack looks\nlike the following:\n\n    DWC3 Gadget                               FFS Application\ndwc3_gadget_soft_disconnect()              ...\n  --> dwc3_stop_active_transfers()\n    --> dwc3_gadget_giveback(-ESHUTDOWN)\n      --> ffs_epfile_async_io_complete()   ffs_aio_cancel()\n        --> usb_ep_free_request()            --> usb_ep_dequeue()\n\nThere is currently no locking implemented between the AIO completion\nhandler and AIO cancel, so the issue occurs if the completion routine is\nrunning in parallel to an AIO cancel call coming from the FFS application.\nAs the completion call frees the USB request (io_data->req) the FFS\napplication is also referencing it for the usb_ep_dequeue() call.  This can\nlead to accessing a stale/hanging pointer.\n\ncommit b566d38857fc (\"usb: gadget: f_fs: use io_data->status consistently\")\nrelocated the usb_ep_free_request() into ffs_epfile_async_io_complete().\nHowever, in order to properly implement locking to mitigate this issue, the\nspinlock can't be added to ffs_epfile_async_io_complete(), as\nusb_ep_dequeue() (if successfully dequeuing a USB request) will call the\nfunction driver's completion handler in the same context.  Hence, leading\ninto a deadlock.\n\nFix this issue by moving the usb_ep_free_request() back to\nffs_user_copy_worker(), and ensuring that it explicitly sets io_data->req\nto NULL after freeing it within the ffs->eps_lock.  This resolves the race\ncondition above, as the ffs_aio_cancel() routine will not continue\nattempting to dequeue a request that has already been freed, or the\nffs_user_copy_work() not freeing the USB request until the AIO cancel is\ndone referencing it.\n\nThis fix depends on\n  commit b566d38857fc (\"usb: gadget: f_fs: use io_data->status\n  consistently\")",
      "affected": [
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "unaffected",
          "versions": [
            {
              "version": "2e4c7553cd6f9c68bb741582dcb614edcbeca70f",
              "status": "affected",
              "versionType": "git",
              "lessThan": "f71a53148ce34898fef099b75386a3a9f4449311"
            },
            {
              "version": "2e4c7553cd6f9c68bb741582dcb614edcbeca70f",
              "status": "affected",
              "versionType": "git",
              "lessThan": "9e72ef59cbe61cd1243857a6418ca92104275867"
            },
            {
              "version": "2e4c7553cd6f9c68bb741582dcb614edcbeca70f",
              "status": "affected",
              "versionType": "git",
              "lessThan": "e500b1c4e29ad0bd1c1332a1eaea2913627a92dd"
            },
            {
              "version": "2e4c7553cd6f9c68bb741582dcb614edcbeca70f",
              "status": "affected",
              "versionType": "git",
              "lessThan": "3613e5023f09b3308545e9d1acda86017ebd418a"
            },
            {
              "version": "2e4c7553cd6f9c68bb741582dcb614edcbeca70f",
              "status": "affected",
              "versionType": "git",
              "lessThan": "a0fdccb1c9e027e3195f947f61aa87d6d0d2ea14"
            },
            {
              "version": "2e4c7553cd6f9c68bb741582dcb614edcbeca70f",
              "status": "affected",
              "versionType": "git",
              "lessThan": "73c05ad46bb4fbbdb346004651576d1c8dbcffbb"
            },
            {
              "version": "2e4c7553cd6f9c68bb741582dcb614edcbeca70f",
              "status": "affected",
              "versionType": "git",
              "lessThan": "d7461830823242702f5d84084bcccb25159003f4"
            },
            {
              "version": "2e4c7553cd6f9c68bb741582dcb614edcbeca70f",
              "status": "affected",
              "versionType": "git",
              "lessThan": "24729b307eefcd7c476065cd7351c1a018082c19"
            }
          ]
        },
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "affected",
          "versions": [
            {
              "version": "3.15",
              "status": "affected"
            },
            {
              "version": "0",
              "status": "unaffected",
              "versionType": "semver",
              "lessThan": "3.15"
            },
            {
              "version": "4.19.317",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "4.19.*"
            },
            {
              "version": "5.4.279",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "5.4.*"
            },
            {
              "version": "5.10.221",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "5.10.*"
            },
            {
              "version": "5.15.162",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "5.15.*"
            },
            {
              "version": "6.1.95",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.1.*"
            },
            {
              "version": "6.6.31",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.6.*"
            },
            {
              "version": "6.8.10",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.8.*"
            },
            {
              "version": "6.9",
              "status": "unaffected",
              "versionType": "original_commit_for_fix",
              "lessThanOrEqual": "*"
            }
          ]
        }
      ]
    }
  }
}