CVE-2025-38481 comedi: Fail COMEDI_INSNLIST ioctl if n_insns is too large
A local attacker can trigger a kernel warning and stack dump by supplying an excessively large instruction count to the comedi ioctl, causing a denial of service.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-38481?
CVE-2025-38481 is a medium-severity denial of service vulnerability in Debian Debian Linux, published on 28 Jul 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Which versions are affected by CVE-2025-38481?
It affects 2 products.
Products include Debian Debian Linux, Linux kernel.
How do I fix CVE-2025-38481?
Apply the vendor's patch.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2025-38481 being exploited?
There is no known exploitation of CVE-2025-38481 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as AZL-65922, BELL-CVE-2025-38481, DEBIAN-CVE-2025-38481, GHSA-wm2g-6m3r-4fx9, ROOT-OS-DEBIAN-11-CVE-2025-38481, ROOT-OS-DEBIAN-12-CVE-2025-38481 and 3 more.