{
  "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-2025-68282",
    "sourceURL": "https://www.cve.org/CVERecord?id=CVE-2025-68282",
    "idYear": 2025,
    "status": "PUBLISHED",
    "publishedAt": "2025-12-16T15:06:04.332Z",
    "updatedAt": "2026-05-11T21:50:08.718Z",
    "importedAt": "2026-10-24T01:57:44.935Z",
    "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: udc: fix use-after-free in usb_gadget_state_work",
      "summary": "In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: udc: fix use-after-free in usb_gadget_state_work\n\nA race condition during gadget teardown can lead to a use-after-free\nin usb_gadget_state_work(), as reported by KASAN:\n\n  BUG: KASAN: invalid-access in sysfs_notify+0x2c/0xd0\n  Workqueue: events usb_gadget_state_work\n\nThe fundamental race occurs because a concurrent event (e.g., an\ninterrupt) can call usb_gadget_set_state() and schedule gadget->work\nat any time during the cleanup process in usb_del_gadget().\n\nCommit 399a45e5237c (\"usb: gadget: core: flush gadget workqueue after\ndevice removal\") attempted to fix this by moving flush_work() to after\ndevice_del(). However, this does not fully solve the race, as a new\nwork item can still be scheduled *after* flush_work() completes but\nbefore the gadget's memory is freed, leading to the same use-after-free.\n\nThis patch fixes the race condition robustly by introducing a 'teardown'\nflag and a 'state_lock' spinlock to the usb_gadget struct. The flag is\nset during cleanup in usb_del_gadget() *before* calling flush_work() to\nprevent any new work from being scheduled once cleanup has commenced.\nThe scheduling site, usb_gadget_set_state(), now checks this flag under\nthe lock before queueing the work, thus safely closing the race window.",
      "affected": [
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "unaffected",
          "versions": [
            {
              "version": "5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15",
              "status": "affected",
              "versionType": "git",
              "lessThan": "dddc944d65169b552e09cb54e3ed4fbb9ea26416"
            },
            {
              "version": "5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15",
              "status": "affected",
              "versionType": "git",
              "lessThan": "eee16f3ff08e759ea828bdf7dc1c0ef2f22134f5"
            },
            {
              "version": "5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15",
              "status": "affected",
              "versionType": "git",
              "lessThan": "c12a0c3ef815ddd67e47f9c819f9fe822fed5467"
            },
            {
              "version": "5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15",
              "status": "affected",
              "versionType": "git",
              "lessThan": "f02a412c0a18f02f0f91b0a3d9788315a721b7fd"
            },
            {
              "version": "5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15",
              "status": "affected",
              "versionType": "git",
              "lessThan": "10014310193cf6736c1aeb4105c5f4a0818d0c65"
            },
            {
              "version": "5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15",
              "status": "affected",
              "versionType": "git",
              "lessThan": "3b32caa73d135eea8fb9cabb45e9fc64c5a3ecb9"
            },
            {
              "version": "5702f75375aa9ecf8ad3431aef3fe6ce8c8dbd15",
              "status": "affected",
              "versionType": "git",
              "lessThan": "baeb66fbd4201d1c4325074e78b1f557dff89b5b"
            }
          ]
        },
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "affected",
          "versions": [
            {
              "version": "3.12",
              "status": "affected"
            },
            {
              "version": "0",
              "status": "unaffected",
              "versionType": "semver",
              "lessThan": "3.12"
            },
            {
              "version": "5.10.248",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "5.10.*"
            },
            {
              "version": "5.15.198",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "5.15.*"
            },
            {
              "version": "6.1.159",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.1.*"
            },
            {
              "version": "6.6.119",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.6.*"
            },
            {
              "version": "6.12.61",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.12.*"
            },
            {
              "version": "6.17.11",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.17.*"
            },
            {
              "version": "6.18",
              "status": "unaffected",
              "versionType": "original_commit_for_fix",
              "lessThanOrEqual": "*"
            }
          ]
        }
      ]
    }
  }
}