VYPR
Unrated severityNVD Advisory· Published Oct 31, 2025· Updated Apr 15, 2026

CVE-2025-40106

CVE-2025-40106

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.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Divide-by-zero vulnerability in Linux kernel's comedi subsystem allows local users to cause kernel panic via crafted command with chanlist_len=0.

Vulnerability

The comedi_buf_munge() function in the Linux kernel's comedi subsystem performs a modulo operation async->munge_chan %= async->cmd.chanlist_len without verifying that chanlist_len is non-zero. If a user program submits a comedi command with chanlist_len set to zero, this results in a divide-by-zero error during data processing in the interrupt handler path.

Exploitation

An unprivileged local user can trigger this vulnerability by crafting a comedi command with chanlist_len = 0 and sending it to the comedi device. The bug is reachable through the standard comedi interface, requiring no special privileges beyond access to the comedi device.

Impact

Successful exploitation leads to a kernel panic, causing a denial of service (DoS) on the affected system. No privilege escalation is possible as the result is a crash.

Mitigation

Patches have been released for stable kernel branches [1][2][3][4]. Users should update their kernels to the latest patched versions. No workaround is available aside from restricting access to comedi devices.

AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

1

Patches

8

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

8

News mentions

0

No linked articles in our index yet.