{"id":"CVE-2025-38481","aliases":["CVE-2025-38481"],"related":[],"kind":"vulnerability","state":"published","title":"comedi: Fail COMEDI_INSNLIST ioctl if n_insns is too large","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ncomedi: Fail COMEDI_INSNLIST ioctl if n_insns is too large\n\nThe handling of the `COMEDI_INSNLIST` ioctl allocates a kernel buffer to\nhold the array of `struct comedi_insn`, getting the length from the\n`n_insns` member of the `struct comedi_insnlist` supplied by the user.\nThe allocation will fail with a WARNING and a stack dump if it is too\nlarge.\n\nAvoid that by failing with an `-EINVAL` error if the supplied `n_insns`\nvalue is unreasonable.\n\nDefine the limit on the `n_insns` value in the `MAX_INSNS` macro.  Set\nthis to the same value as `MAX_SAMPLES` (65536), which is the maximum\nallowed sum of the values of the member `n` in the array of `struct\ncomedi_insn`, and sensible comedi instructions will have an `n` of at\nleast 1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ncomedi: Fail COMEDI_INSNLIST ioctl if n_insns is too large\n\nThe handling of the `COMEDI_INSNLIST` ioctl allocates a kernel buffer to\nhold the array of `struct comedi_insn`, getting the length from the\n`n_insns` member of the `struct comedi_insnlist` supplied by the user.\nThe allocation will fail with a WARNING and a stack dump if it is too\nlarge.\n\nAvoid that by failing with an `-EINVAL` error if the supplied `n_insns`\nvalue is unreasonable.\n\nDefine the limit on the `n_insns` value in the `MAX_INSNS` macro.  Set\nthis to the same value as `MAX_SAMPLES` (65536), which is the maximum\nallowed sum of the values of the member `n` in the array of `struct\ncomedi_insn`, and sensible comedi instructions will have an `n` of at\nleast 1.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: comedi: Error en el ioctl COMEDI_INSNLIST si n_insns es demasiado grande El manejo del ioctl `COMEDI_INSNLIST` asigna un búfer del kernel para contener la matriz de `struct comedi_insn`, obteniendo la longitud del miembro `n_insns` de la `struct comedi_insnlist` proporcionada por el usuario. La asignación fallará con un WARNING y un volcado de pila si es demasiado grande. Evítelo fallando con un error `-EINVAL` si el valor `n_insns` proporcionado no es razonable. Defina el límite en el valor `n_insns` en la macro `MAX_INSNS`. Establezca esto en el mismo valor que `MAX_SAMPLES` (65536), que es la suma máxima permitida de los valores del miembro `n` en la matriz de `struct comedi_insn`, y las instrucciones comedi sensatas tendrán un `n` de al menos 1.","source":"nvd"}],"published":"2025-07-28T11:21:46.147Z","modified":"2026-06-17T09:16:57.047Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"ed9eccbe8970f6eedc1b978c157caf1251a896d4","fixed":"454d732dfd0aef7d7aa950c409215ca06d717e93","status":"affected"},{"type":"git","introduced":"ed9eccbe8970f6eedc1b978c157caf1251a896d4","fixed":"c68257588e87f45530235701a42496b7e9e56adb","status":"affected"},{"type":"git","introduced":"ed9eccbe8970f6eedc1b978c157caf1251a896d4","fixed":"69dc06b9514522de532e997a21d035cd29b0db44","status":"affected"},{"type":"git","introduced":"ed9eccbe8970f6eedc1b978c157caf1251a896d4","fixed":"d4c73ce13f5b5a0fe0319f1f352ff602f0ace8e3","status":"affected"},{"type":"git","introduced":"ed9eccbe8970f6eedc1b978c157caf1251a896d4","fixed":"c9d3d9667443caafa804cd07940aeaef8e53aa90","status":"affected"},{"type":"git","introduced":"ed9eccbe8970f6eedc1b978c157caf1251a896d4","fixed":"992d600f284e719242a434166e86c1999649b71c","status":"affected"},{"type":"git","introduced":"ed9eccbe8970f6eedc1b978c157caf1251a896d4","fixed":"e3b8322cc8081d142ee4c1a43e1d702bdba1ed76","status":"affected"},{"type":"git","introduced":"ed9eccbe8970f6eedc1b978c157caf1251a896d4","fixed":"08ae4b20f5e82101d77326ecab9089e110f224cc","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.29","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.29","status":"unaffected"},{"type":"semver","introduced":"5.4.297","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.241","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.190","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.147","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.100","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.40","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.15.8","lastAffected":"6.15.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.16","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"2.6.29","fixed":"5.4.297"},{"status":"affected","introduced":"5.5","fixed":"5.10.241"},{"status":"affected","introduced":"5.11","fixed":"5.15.190"},{"status":"affected","introduced":"5.16","fixed":"6.1.147"},{"status":"affected","introduced":"6.2","fixed":"6.6.100"},{"status":"affected","introduced":"6.7","fixed":"6.12.40"},{"status":"affected","introduced":"6.13","fixed":"6.15.8"},{"status":"affected","version":"6.16"},{"status":"affected","version":"6.16"},{"status":"affected","version":"6.16"},{"status":"affected","version":"6.16"},{"status":"affected","version":"6.16"},{"status":"affected","version":"6.16"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"11.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/454d732dfd0aef7d7aa950c409215ca06d717e93","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c68257588e87f45530235701a42496b7e9e56adb","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/69dc06b9514522de532e997a21d035cd29b0db44","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d4c73ce13f5b5a0fe0319f1f352ff602f0ace8e3","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c9d3d9667443caafa804cd07940aeaef8e53aa90","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/992d600f284e719242a434166e86c1999649b71c","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e3b8322cc8081d142ee4c1a43e1d702bdba1ed76","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/08ae4b20f5e82101d77326ecab9089e110f224cc","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html","tags":["third-party-advisory"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-38481","url":"https://www.cve.org/CVERecord?id=CVE-2025-38481","licence":"CVE Terms of Use","modified":"2026-05-11T21:28:50.751Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-38481","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38481","licence":"Public domain","modified":"2026-06-17T09:16:57.047Z"}],"updatedAt":"2026-11-25T22:59:01.803Z","epss":{"score":0.00194,"percentile":0.09574,"date":"2026-12-01T12:00:22.000Z"}}