{
  "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-38687",
    "sourceURL": "https://www.cve.org/CVERecord?id=CVE-2025-38687",
    "idYear": 2025,
    "status": "PUBLISHED",
    "publishedAt": "2025-09-04T15:32:41.702Z",
    "updatedAt": "2026-08-05T12:03:57.908Z",
    "importedAt": "2026-10-24T01:57:34.152Z",
    "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": "comedi: fix race between polling and detaching",
      "summary": "In the Linux kernel, the following vulnerability has been resolved:\n\ncomedi: fix race between polling and detaching\n\nsyzbot reports a use-after-free in comedi in the below link, which is\ndue to comedi gladly removing the allocated async area even though poll\nrequests are still active on the wait_queue_head inside of it. This can\ncause a use-after-free when the poll entries are later triggered or\nremoved, as the memory for the wait_queue_head has been freed.  We need\nto check there are no tasks queued on any of the subdevices' wait queues\nbefore allowing the device to be detached by the `COMEDI_DEVCONFIG`\nioctl.\n\nTasks will read-lock `dev->attach_lock` before adding themselves to the\nsubdevice wait queue, so fix the problem in the `COMEDI_DEVCONFIG` ioctl\nhandler by write-locking `dev->attach_lock` before checking that all of\nthe subdevices are safe to be deleted.  This includes testing for any\nsleepers on the subdevices' wait queues.  It remains locked until the\ndevice has been detached.  This requires the `comedi_device_detach()`\nfunction to be refactored slightly, moving the bulk of it into new\nfunction `comedi_device_detach_locked()`.\n\nNote that the refactor of `comedi_device_detach()` results in\n`comedi_device_cancel_all()` now being called while `dev->attach_lock`\nis write-locked, which wasn't the case previously, but that does not\nmatter.\n\nThanks to Jens Axboe for diagnosing the problem and co-developing this\npatch.",
      "affected": [
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "unaffected",
          "versions": [
            {
              "version": "2f3fdcd7ce935f6f2899ceab57dc8fe5286db3e1",
              "status": "affected",
              "versionType": "git",
              "lessThan": "fe67122ba781df44a1a9716eb1dfd751321ab512"
            },
            {
              "version": "2f3fdcd7ce935f6f2899ceab57dc8fe5286db3e1",
              "status": "affected",
              "versionType": "git",
              "lessThan": "cd4286123d6948ff638ea9cd5818ae4796d5d252"
            },
            {
              "version": "2f3fdcd7ce935f6f2899ceab57dc8fe5286db3e1",
              "status": "affected",
              "versionType": "git",
              "lessThan": "d85fac8729c9acfd72368faff1d576ec585e5c8f"
            },
            {
              "version": "2f3fdcd7ce935f6f2899ceab57dc8fe5286db3e1",
              "status": "affected",
              "versionType": "git",
              "lessThan": "0f989f9d05492028afd2bded4b42023c57d8a76e"
            },
            {
              "version": "2f3fdcd7ce935f6f2899ceab57dc8fe5286db3e1",
              "status": "affected",
              "versionType": "git",
              "lessThan": "5c4a2ffcbd052c69bbf4680677d4c4eaa5a252d4"
            },
            {
              "version": "2f3fdcd7ce935f6f2899ceab57dc8fe5286db3e1",
              "status": "affected",
              "versionType": "git",
              "lessThan": "017198079551a2a5cf61eae966af3c4b145e1f3b"
            },
            {
              "version": "2f3fdcd7ce935f6f2899ceab57dc8fe5286db3e1",
              "status": "affected",
              "versionType": "git",
              "lessThan": "71ca60d2e631cf9c63bcbc7017961c61ff04e419"
            },
            {
              "version": "2f3fdcd7ce935f6f2899ceab57dc8fe5286db3e1",
              "status": "affected",
              "versionType": "git",
              "lessThan": "5724e82df4f9a4be62908362c97d522d25de75dd"
            },
            {
              "version": "2f3fdcd7ce935f6f2899ceab57dc8fe5286db3e1",
              "status": "affected",
              "versionType": "git",
              "lessThan": "35b6fc51c666fc96355be5cd633ed0fe4ccf68b2"
            }
          ]
        },
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "affected",
          "versions": [
            {
              "version": "3.14",
              "status": "affected"
            },
            {
              "version": "0",
              "status": "unaffected",
              "versionType": "semver",
              "lessThan": "3.14"
            },
            {
              "version": "5.4.297",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "5.4.*"
            },
            {
              "version": "5.10.241",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "5.10.*"
            },
            {
              "version": "5.15.190",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "5.15.*"
            },
            {
              "version": "6.1.149",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.1.*"
            },
            {
              "version": "6.6.103",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.6.*"
            },
            {
              "version": "6.12.43",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.12.*"
            },
            {
              "version": "6.15.11",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.15.*"
            },
            {
              "version": "6.16.2",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.16.*"
            },
            {
              "version": "6.17",
              "status": "unaffected",
              "versionType": "original_commit_for_fix",
              "lessThanOrEqual": "*"
            }
          ]
        }
      ]
    }
  }
}