{
  "id": "CVE-2025-39686",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-39686",
  "published_at": "2025-09-05T17:20:53.071Z",
  "title": "comedi: Make insn_rw_emulate_bits() do insn-\u003en samples",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.8,
    "source": "nvd",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\ncomedi: Make insn_rw_emulate_bits() do insn-\u003en samples\n\nThe `insn_rw_emulate_bits()` function is used as a default handler for\n`INSN_READ` instructions for subdevices that have a handler for\n`INSN_BITS` but not for `INSN_READ`.  Similarly, it is used as a default\nhandler for `INSN_WRITE` instructions for subdevices that have a handler\nfor `INSN_BITS` but not for `INSN_WRITE`. It works by emulating the\n`INSN_READ` or `INSN_WRITE` instruction handling with a constructed\n`INSN_BITS` instruction.  However, `INSN_READ` and `INSN_WRITE`\ninstructions are supposed to be able read or write multiple samples,\nindicated by the `insn-\u003en` value, but `insn_rw_emulate_bits()` currently\nonly handles a single sample.  For `INSN_READ`, the comedi core will\ncopy `insn-\u003en` samples back to user-space.  (That triggered KASAN\nkernel-infoleak errors when `insn-\u003en` was greater than 1, but that is\nbeing fixed more generally elsewhere in the comedi core.)\n\nMake `insn_rw_emulate_bits()` either handle `insn-\u003en` samples, or return\nan error, to conform to the general expectation for `INSN_READ` and\n`INSN_WRITE` handlers.",
  "cpes": [
    "cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc1:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc2:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "nvd": 7.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= ed9eccbe8970f6eedc1b978c157caf1251a896d4, \u003c ab77e85bd3bc006ef40738f26f446a660813da44",
          "\u003e= ed9eccbe8970f6eedc1b978c157caf1251a896d4, \u003c ae8bc1f07bcb31b8636420e03d1f9c3df6219a2b",
          "\u003e= ed9eccbe8970f6eedc1b978c157caf1251a896d4, \u003c 842f307a1d115b24f2bcb2415c4e344f11f55930",
          "\u003e= ed9eccbe8970f6eedc1b978c157caf1251a896d4, \u003c 92352ed2f9ac422181e381c2430c2d0dfb46faa0",
          "\u003e= ed9eccbe8970f6eedc1b978c157caf1251a896d4, \u003c dc0a2f142d655700db43de90cb6abf141b73d908",
          "\u003e= ed9eccbe8970f6eedc1b978c157caf1251a896d4, \u003c 7afba9221f70d4cbce0f417c558879cba0eb5e66"
        ],
        "fixed_in": [
          "ab77e85bd3bc006ef40738f26f446a660813da44",
          "ae8bc1f07bcb31b8636420e03d1f9c3df6219a2b",
          "842f307a1d115b24f2bcb2415c4e344f11f55930",
          "92352ed2f9ac422181e381c2430c2d0dfb46faa0",
          "dc0a2f142d655700db43de90cb6abf141b73d908",
          "7afba9221f70d4cbce0f417c558879cba0eb5e66"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "2.6.29"
        ],
        "fixed_in": [
          "0",
          "5.15.190",
          "6.1.149",
          "6.6.103",
          "6.12.44",
          "6.16.4",
          "6.17"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to ab77e85bd3bc006ef40738f26f446a660813da44 or ae8bc1f07bcb31b8636420e03d1f9c3df6219a2b or 842f307a1d115b24f2bcb2415c4e344f11f55930 or 92352ed2f9ac422181e381c2430c2d0dfb46faa0 or dc0a2f142d655700db43de90cb6abf141b73d908 or 7afba9221f70d4cbce0f417c558879cba0eb5e66 or later.",
      "Upgrade Linux to 0 or 5.15.190 or 6.1.149 or 6.6.103 or 6.12.44 or 6.16.4 or 6.17 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
