CVE-2025-38478
JSON

7.8high

comedi: Fix initialization of data for instructions that write to subdevice

Severity
7.8high CVSS:3.1 by Linux
Exploit likelihood
0.20% (higher than 9% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: comedi: Fix initialization of data for instructions that write to subdevice Some Comedi subdevice instruction handlers are known to access instruction data elements beyond the first `insn->n` elements in some cases. The `do_insn_ioctl()` and `do_insnlist_ioctl()` functions allocate at least `MIN_SAMPLES` (16) data elements to deal with this, but they do not initialize all of that. For Comedi instruction codes that write to the subdevice, the first `insn->n` data elements are copied from user-space, but the remaining elements are left uninitialized. That could be a problem if the subdevice instruction handler reads the uninitialized data. Ensure that the first `MIN_SAMPLES` elements are initialized before calling these instruction handlers, filling the uncopied elements with 0. For `do_insnlist_ioctl()`, the same data buffer elements are used for handling a list of instructions, so ensure the first `MIN_SAMPLES` elements are initialized for each instruction that writes to the subdevice.

Affected

Product or packageVersionsReported by
Linux Linuxfrom ed9eccbe8970f6eedc1b978c157caf1251a896d4 before 6f38c6380c3b38a05032b8881e41137385a6ce02, from ed9eccbe8970f6eedc1b978c157caf1251a896d4 before 13e4d9038a1e869445a996a3f604a84ef52fe8f4, from ed9eccbe8970f6eedc1b978c157caf1251a896d4 before 020eed5681d0f9bced73970368078a92d6cfaa9c, from ed9eccbe8970f6eedc1b978c157caf1251a896d4 before d3436638738ace8f101af7bdee2eae1bc38e9b29, from ed9eccbe8970f6eedc1b978c157caf1251a896d4 before 673ee92bd2d31055bca98a1d96b653f5284289c4, from ed9eccbe8970f6eedc1b978c157caf1251a896d4 before c42116dc70af6664526f7aa82cf937824ab42649, from ed9eccbe8970f6eedc1b978c157caf1251a896d4 before fe8713fb4e4e82a4f91910d9a41bf0613e69a0b9, from ed9eccbe8970f6eedc1b978c157caf1251a896d4 before 46d8c744136ce2454aa4c35c138cc06817f92b8e and 1 more
Not affected: before 2.6.29, from 5.4.297 up to 5.4.*, from 5.10.241 up to 5.10.*, from 5.15.190 up to 5.15.*, from 6.1.147 up to 6.1.*, from 6.6.100 up to 6.6.*
CVE List
linux linux_kernelfrom 2.6.29 before 5.4.297, from 5.5 before 5.10.241, from 5.11 before 5.15.190, from 5.16 before 6.1.147, from 6.2 before 6.6.100, from 6.7 before 6.12.40, from 6.13 before 6.15.8, 6.16NVD
debian debian_linux11.0NVD

All scores

Linux7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-908

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

In the Linux kernel, the following vulnerability has been resolved: comedi: Fix initialization of data for instructions that write to subdevice Some Comedi subdevice instruction handlers are known to access instruction data elements beyond the first `insn->n` elements in some cases. The `do_insn_ioctl()` and `do_insnlist_ioctl()` functions allocate at least `MIN_SAMPLES` (16) data elements to deal with this, but they do not initialize all of that. For Comedi instruction codes that write to the subdevice, the first `insn->n` data elements are copied from user-space, but the remaining elements are left uninitialized. That could be a problem if the subdevice instruction handler reads the uninitialized data. Ensure that the first `MIN_SAMPLES` elements are initialized before calling these instruction handlers, filling the uncopied elements with 0. For `do_insnlist_ioctl()`, the same data buffer elements are used for handling a list of instructions, so ensure the first `MIN_SAMPLES` elements are initialized for each instruction that writes to the subdevice.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: comedi: Se corrige la inicialización de datos para instrucciones que escriben en el subdispositivo Se sabe que algunos controladores de instrucciones del subdispositivo Comedi acceden a elementos de datos de instrucción más allá de los primeros elementos `insn->n` en algunos casos. Las funciones `do_insn_ioctl()` y `do_insnlist_ioctl()` asignan al menos `MIN_SAMPLES` (16) elementos de datos para lidiar con esto, pero no inicializan todo eso. Para los códigos de instrucción Comedi que escriben en el subdispositivo, los primeros elementos de datos `insn->n` se copian del espacio de usuario, pero los elementos restantes se dejan sin inicializar. Eso podría ser un problema si el controlador de instrucciones del subdispositivo lee los datos no inicializados. Asegúrese de que los primeros elementos `MIN_SAMPLES` se inicialicen antes de llamar a estos controladores de instrucciones, llenando los elementos no copiados con 0. Para `do_insnlist_ioctl()`, se utilizan los mismos elementos del búfer de datos para manejar una lista de instrucciones, así que asegúrese de que los primeros elementos `MIN_SAMPLES` se inicialicen para cada instrucción que escriba en el subdispositivo.

References

https://git.kernel.org/stable/c/6f38c6380c3b38a05032b8881e41137385a6ce02patch
https://git.kernel.org/stable/c/13e4d9038a1e869445a996a3f604a84ef52fe8f4patch
https://git.kernel.org/stable/c/020eed5681d0f9bced73970368078a92d6cfaa9cpatch
https://git.kernel.org/stable/c/d3436638738ace8f101af7bdee2eae1bc38e9b29patch
https://git.kernel.org/stable/c/673ee92bd2d31055bca98a1d96b653f5284289c4patch
https://git.kernel.org/stable/c/c42116dc70af6664526f7aa82cf937824ab42649patch
https://git.kernel.org/stable/c/fe8713fb4e4e82a4f91910d9a41bf0613e69a0b9patch
https://git.kernel.org/stable/c/46d8c744136ce2454aa4c35c138cc06817f92b8epatch
https://lists.debian.org/debian-lts-announce/2025/10/msg00008.htmlmailing-list, third-party-advisory
https://lists.debian.org/debian-lts-announce/2025/10/msg00007.htmlmailing-list, third-party-advisory

Sources

SourceRecordLicence
CVE ListCVE-2025-38478 changed 2026-10-15CVE Terms of Use
NVDCVE-2025-38478 changed 2026-10-15Public domain