CVE-2025-40106
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-10-31

Last updated on: 2025-11-04

Assigner: kernel.org

Description
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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-10-31
Last Modified
2025-11-04
Generated
2026-06-16
AI Q&A
2025-10-31
EPSS Evaluated
2026-06-15
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
linux linux_kernel *
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

This vulnerability is a divide-by-zero error in the Linux kernel's comedi_buf_munge() function. The function performs a modulo operation without checking if the divisor (chanlist_len) is zero. If a user program submits a command with chanlist_len set to zero, it causes a divide-by-zero error during data processing in the interrupt handler, potentially leading to a kernel panic. The fix adds a check for zero chanlist_len to prevent this error.

Impact Analysis

This vulnerability can cause the Linux kernel to panic due to a divide-by-zero error when processing malformed user commands with chanlist_len set to zero. This can lead to system crashes or instability, potentially disrupting services or applications relying on the affected kernel component.

Mitigation Strategies

Apply the patch or update to the Linux kernel version that includes the fix for the divide-by-zero error in comedi_buf_munge(). This fix adds a check for zero chanlist_len to prevent kernel panics caused by malformed user commands.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2025-40106. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart