CVE-2025-39686

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-39686
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-39686.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-39686
Downstream
Related
Published
2025-09-05T17:20:53.071Z
Modified
2025-11-28T02:35:30.331163Z
Summary
comedi: Make insn_rw_emulate_bits() do insn->n samples
Details

In the Linux kernel, the following vulnerability has been resolved:

comedi: Make insnrwemulate_bits() do insn->n samples

The insn_rw_emulate_bits() function is used as a default handler for INSN_READ instructions for subdevices that have a handler for INSN_BITS but not for INSN_READ. Similarly, it is used as a default handler for INSN_WRITE instructions for subdevices that have a handler for INSN_BITS but not for INSN_WRITE. It works by emulating the INSN_READ or INSN_WRITE instruction handling with a constructed INSN_BITS instruction. However, INSN_READ and INSN_WRITE instructions are supposed to be able read or write multiple samples, indicated by the insn->n value, but insn_rw_emulate_bits() currently only handles a single sample. For INSN_READ, the comedi core will copy insn->n samples back to user-space. (That triggered KASAN kernel-infoleak errors when insn->n was greater than 1, but that is being fixed more generally elsewhere in the comedi core.)

Make insn_rw_emulate_bits() either handle insn->n samples, or return an error, to conform to the general expectation for INSN_READ and INSN_WRITE handlers.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39686.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
ed9eccbe8970f6eedc1b978c157caf1251a896d4
Fixed
ab77e85bd3bc006ef40738f26f446a660813da44
Fixed
ae8bc1f07bcb31b8636420e03d1f9c3df6219a2b
Fixed
842f307a1d115b24f2bcb2415c4e344f11f55930
Fixed
92352ed2f9ac422181e381c2430c2d0dfb46faa0
Fixed
dc0a2f142d655700db43de90cb6abf141b73d908
Fixed
7afba9221f70d4cbce0f417c558879cba0eb5e66

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
2.6.29
Fixed
5.15.190
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.149
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.103
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.44
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.16.4