{
  "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-2022-49398",
    "sourceURL": "https://www.cve.org/CVERecord?id=CVE-2022-49398",
    "idYear": 2022,
    "status": "PUBLISHED",
    "publishedAt": "2025-02-26T02:12:27.141Z",
    "updatedAt": "2026-05-23T15:22:06.437Z",
    "importedAt": "2026-10-24T01:56:49.724Z",
    "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: dwc3: gadget: Replace list_for_each_entry_safe() if using giveback",
      "summary": "In the Linux kernel, the following vulnerability has been resolved:\n\nusb: dwc3: gadget: Replace list_for_each_entry_safe() if using giveback\n\nThe list_for_each_entry_safe() macro saves the current item (n) and\nthe item after (n+1), so that n can be safely removed without\ncorrupting the list.  However, when traversing the list and removing\nitems using gadget giveback, the DWC3 lock is briefly released,\nallowing other routines to execute.  There is a situation where, while\nitems are being removed from the cancelled_list using\ndwc3_gadget_ep_cleanup_cancelled_requests(), the pullup disable\nroutine is running in parallel (due to UDC unbind).  As the cleanup\nroutine removes n, and the pullup disable removes n+1, once the\ncleanup retakes the DWC3 lock, it references a request who was already\nremoved/handled.  With list debug enabled, this leads to a panic.\nEnsure all instances of the macro are replaced where gadget giveback\nis used.\n\nExample call stack:\n\nThread#1:\n__dwc3_gadget_ep_set_halt() - CLEAR HALT\n  -> dwc3_gadget_ep_cleanup_cancelled_requests()\n    ->list_for_each_entry_safe()\n    ->dwc3_gadget_giveback(n)\n      ->dwc3_gadget_del_and_unmap_request()- n deleted[cancelled_list]\n      ->spin_unlock\n      ->Thread#2 executes\n      ...\n    ->dwc3_gadget_giveback(n+1)\n      ->Already removed!\n\nThread#2:\ndwc3_gadget_pullup()\n  ->waiting for dwc3 spin_lock\n  ...\n  ->Thread#1 released lock\n  ->dwc3_stop_active_transfers()\n    ->dwc3_remove_requests()\n      ->fetches n+1 item from cancelled_list (n removed by Thread#1)\n      ->dwc3_gadget_giveback()\n        ->dwc3_gadget_del_and_unmap_request()- n+1 deleted[cancelled_list]\n        ->spin_unlock",
      "affected": [
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "unaffected",
          "versions": [
            {
              "version": "d4f1afe5e896c18ae01099a85dab5e1a198bd2a8",
              "status": "affected",
              "versionType": "git",
              "lessThan": "1c6e5dc3b639c96e6839a8d1b8e951923fdfd34a"
            },
            {
              "version": "d4f1afe5e896c18ae01099a85dab5e1a198bd2a8",
              "status": "affected",
              "versionType": "git",
              "lessThan": "2424307cdf421ac72075a1384eae4e4199ab6457"
            },
            {
              "version": "d4f1afe5e896c18ae01099a85dab5e1a198bd2a8",
              "status": "affected",
              "versionType": "git",
              "lessThan": "26a7e6832afe9d9a991cfd9015177f083cf959cc"
            },
            {
              "version": "d4f1afe5e896c18ae01099a85dab5e1a198bd2a8",
              "status": "affected",
              "versionType": "git",
              "lessThan": "bf594d1d0c1d7b895954018043536ffd327844f9"
            },
            {
              "version": "d7ff2e3ff0e09d57b43014fe26b13bb3c9677254",
              "status": "affected",
              "versionType": "git"
            },
            {
              "version": "4.19.57",
              "status": "affected",
              "versionType": "semver",
              "lessThan": "4.20"
            }
          ]
        },
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "affected",
          "versions": [
            {
              "version": "5.0",
              "status": "affected"
            },
            {
              "version": "0",
              "status": "unaffected",
              "versionType": "semver",
              "lessThan": "5.0"
            },
            {
              "version": "5.15.47",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "5.15.*"
            },
            {
              "version": "5.17.15",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "5.17.*"
            },
            {
              "version": "5.18.4",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "5.18.*"
            },
            {
              "version": "5.19",
              "status": "unaffected",
              "versionType": "original_commit_for_fix",
              "lessThanOrEqual": "*"
            }
          ]
        }
      ]
    }
  }
}