CVE-2025-38481

comedi: Fail COMEDI_INSNLIST ioctl if n_insns is too large

No CVSS score yet EPSS 0.19%

Published 28 Jul 2025 Updated 11 May 2026 CNA: Linux

Check your servers for CVE-2025-38481

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-38481 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

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

comedi: Fail COMEDI_INSNLIST ioctl if n_insns is too large

The handling of the `COMEDI_INSNLIST` ioctl allocates a kernel buffer to hold the array of `struct comedi_insn`, getting the length from the `n_insns` member of the `struct comedi_insnlist` supplied by the user. The allocation will fail with a WARNING and a stack dump if it is too large.

Avoid that by failing with an `-EINVAL` error if the supplied `n_insns` value is unreasonable.

Define the limit on the `n_insns` value in the `MAX_INSNS` macro. Set this to the same value as `MAX_SAMPLES` (65536), which is the maximum allowed sum of the values of the member `n` in the array of `struct comedi_insn`, and sensible comedi instructions will have an `n` of at least 1.

Exploitation

EPSS 0.19%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 9.57% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from ed9eccbe8970f6eedc1b978c157caf1251a896d4, before 454d732dfd0aef7d7aa950c409215ca06d717e93
affected from ed9eccbe8970f6eedc1b978c157caf1251a896d4, before c68257588e87f45530235701a42496b7e9e56adb
affected from ed9eccbe8970f6eedc1b978c157caf1251a896d4, before 69dc06b9514522de532e997a21d035cd29b0db44
affected from ed9eccbe8970f6eedc1b978c157caf1251a896d4, before d4c73ce13f5b5a0fe0319f1f352ff602f0ace8e3
affected from ed9eccbe8970f6eedc1b978c157caf1251a896d4, before c9d3d9667443caafa804cd07940aeaef8e53aa90
affected from ed9eccbe8970f6eedc1b978c157caf1251a896d4, before 992d600f284e719242a434166e86c1999649b71c
affected from ed9eccbe8970f6eedc1b978c157caf1251a896d4, before e3b8322cc8081d142ee4c1a43e1d702bdba1ed76
affected from ed9eccbe8970f6eedc1b978c157caf1251a896d4, before 08ae4b20f5e82101d77326ecab9089e110f224cc
Other versions: unaffected
Linux
affected 2.6.29
unaffected before 2.6.29
unaffected from 5.4.297 up to and including 5.4.*
unaffected from 5.10.241 up to and including 5.10.*
unaffected from 5.15.190 up to and including 5.15.*
unaffected from 6.1.147 up to and including 6.1.*
unaffected from 6.6.100 up to and including 6.6.*
unaffected from 6.12.40 up to and including 6.12.*
unaffected from 6.15.8 up to and including 6.15.*
unaffected 6.16 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2025-38481 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-38481

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2025-38481
trivy image --scanners vuln IMAGE | grep CVE-2025-38481

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2025-38481 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.