{"id":"CVE-2025-38481","summary":"comedi: Fail COMEDI_INSNLIST ioctl if n_insns is too large","details":"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.","modified":"2026-04-16T04:39:31.215876338Z","published":"2025-07-28T11:21:46.147Z","related":["SUSE-SU-2025:02853-1","SUSE-SU-2025:02923-1","SUSE-SU-2025:02969-1","SUSE-SU-2025:02996-1","SUSE-SU-2025:02997-1","SUSE-SU-2025:03011-1","SUSE-SU-2025:03023-1","SUSE-SU-2025:20577-1","SUSE-SU-2025:20586-1","SUSE-SU-2025:20601-1","SUSE-SU-2025:20602-1","SUSE-SU-2025:21074-1","SUSE-SU-2025:21139-1","SUSE-SU-2025:21179-1","openSUSE-SU-2025:20081-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38481.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/08ae4b20f5e82101d77326ecab9089e110f224cc"},{"type":"WEB","url":"https://git.kernel.org/stable/c/454d732dfd0aef7d7aa950c409215ca06d717e93"},{"type":"WEB","url":"https://git.kernel.org/stable/c/69dc06b9514522de532e997a21d035cd29b0db44"},{"type":"WEB","url":"https://git.kernel.org/stable/c/992d600f284e719242a434166e86c1999649b71c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c68257588e87f45530235701a42496b7e9e56adb"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c9d3d9667443caafa804cd07940aeaef8e53aa90"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d4c73ce13f5b5a0fe0319f1f352ff602f0ace8e3"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e3b8322cc8081d142ee4c1a43e1d702bdba1ed76"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38481.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38481"},{"type":"PACKAGE","url":"https://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":"454d732dfd0aef7d7aa950c409215ca06d717e93"},{"fixed":"c68257588e87f45530235701a42496b7e9e56adb"},{"fixed":"69dc06b9514522de532e997a21d035cd29b0db44"},{"fixed":"d4c73ce13f5b5a0fe0319f1f352ff602f0ace8e3"},{"fixed":"c9d3d9667443caafa804cd07940aeaef8e53aa90"},{"fixed":"992d600f284e719242a434166e86c1999649b71c"},{"fixed":"e3b8322cc8081d142ee4c1a43e1d702bdba1ed76"},{"fixed":"08ae4b20f5e82101d77326ecab9089e110f224cc"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38481.json"}}],"schema_version":"1.7.5"}