{"id":"CVE-2025-38481","published":"2025-07-28T11:21:46Z","modified":"2026-05-11T21:28:50Z","title":"comedi: Fail COMEDI_INSNLIST ioctl if n_insns is too large","vendor":"Linux","product":"Linux","tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.0019,"percentile":0.08622,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/454d732dfd0aef7d7aa950c409215ca06d717e93","tags":[]},{"url":"https://git.kernel.org/stable/c/c68257588e87f45530235701a42496b7e9e56adb","tags":[]},{"url":"https://git.kernel.org/stable/c/69dc06b9514522de532e997a21d035cd29b0db44","tags":[]},{"url":"https://git.kernel.org/stable/c/d4c73ce13f5b5a0fe0319f1f352ff602f0ace8e3","tags":[]},{"url":"https://git.kernel.org/stable/c/c9d3d9667443caafa804cd07940aeaef8e53aa90","tags":[]},{"url":"https://git.kernel.org/stable/c/992d600f284e719242a434166e86c1999649b71c","tags":[]},{"url":"https://git.kernel.org/stable/c/e3b8322cc8081d142ee4c1a43e1d702bdba1ed76","tags":[]},{"url":"https://git.kernel.org/stable/c/08ae4b20f5e82101d77326ecab9089e110f224cc","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html","tags":[]}],"priority":{"score":1.7,"factors":[{"name":"EPSS percentile","points":1.72}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= ed9eccbe8970f6eedc1b978c157caf1251a896d4, < 454d732dfd0aef7d7aa950c409215ca06d717e93",">= ed9eccbe8970f6eedc1b978c157caf1251a896d4, < c68257588e87f45530235701a42496b7e9e56adb",">= ed9eccbe8970f6eedc1b978c157caf1251a896d4, < 69dc06b9514522de532e997a21d035cd29b0db44",">= ed9eccbe8970f6eedc1b978c157caf1251a896d4, < d4c73ce13f5b5a0fe0319f1f352ff602f0ace8e3",">= ed9eccbe8970f6eedc1b978c157caf1251a896d4, < c9d3d9667443caafa804cd07940aeaef8e53aa90",">= ed9eccbe8970f6eedc1b978c157caf1251a896d4, < 992d600f284e719242a434166e86c1999649b71c",">= ed9eccbe8970f6eedc1b978c157caf1251a896d4, < e3b8322cc8081d142ee4c1a43e1d702bdba1ed76",">= ed9eccbe8970f6eedc1b978c157caf1251a896d4, < 08ae4b20f5e82101d77326ecab9089e110f224cc"]},{"vendor":"Linux","product":"Linux","versions":["2.6.29"]}],"euvd":{"id":"EUVD-2025-22882","exploited":false,"provenance":"source"}}