CVE-2025-40106
comedi: fix divide-by-zero in comedi_buf_munge()
Reported by linux · Published October 31, 2025
In the Linux kernel, the following vulnerability has been resolved: comedi: fix divide-by-zero in comedi_buf_munge() The comedi_buf_munge() function performs a modulo operation `async->munge_chan %= async->cmd.chanlist_len` without first checking if chanlist_len is zero. If a user program submits a command with chanlist_len set to zero, this causes a divide-by-zero error when the device processes data in the interrupt handler path. Add a check for zero chanlist_len at the beginning of the function, similar to the existing checks for !map and CMDF_RAWDATA flag. When chanlist_len is zero, update munge_count and return early, indicating the data was handled without munging. This prevents potential kernel panics from malformed user commands.
EPSS 0.21% · 11.1th percentile
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | ed9eccbe8970f6eedc1b978c157caf1251a896d4, ed9eccbe8970f6eedc1b978c157caf1251a896d4, ed9eccbe8970f6eedc1b978c157caf1251a896d4 |
| Linux | Linux | 2.6.29, 0, 5.4.301 |
| linux | linux_kernel | 2.6.29, 2.6.29, 2.6.29 |
| Linux | Linux | *, *, * |
Timeline
- Oct 31, 2025 EPSS Score (30 in total, the first dated here)
- Oct 31, 2025 CVE Published
- Dec 17, 2025 PoC Published
- Mar 29, 2026 Distribution Patch (101 in total, the first dated here)
- Mar 29, 2026 Security Advisory (143 in total, the first dated here)
- May 11, 2026 CVE Updated
- Jun 8, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-40106
vulnetix vdb fixes CVE-2025-40106
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-40106/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart