KernelScan.io

HIGH

comedi Firmware OOB

CVE-2026-31748

CVSS 7.8 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI5.0MEDIUM

01

In the Linux kernel, the following vulnerability has been resolved: comedi: me_daq: Fix potential overrun of firmware buffer `me2600_xilinx_download()` loads the firmware that was requested by `request_firmware()`. It is possible for it to overrun the source buffer because it blindly trusts the file format. It reads a data stream length from the first 4 bytes into variable `file_length` and reads the data stream contents of length `file_length` from offset 16 onwards. Although it checks that the supplied firmware is at least 16 bytes long, it does not check that it is long enough to contain the data stream. Add a test to ensure that the supplied firmware is long enough to contain the header and the data stream. On failure, log an error and return `-EINVAL`.

02

Engine v0.2.0

Risk summary

Systems with ME-2600 series PCI data acquisition hardware are vulnerable to limited kernel memory disclosure and denial of service when malicious firmware is loaded. Only privileged users with root access or CAP_SYS_RAWIO can trigger this vulnerability. The unbounded out-of-bounds read will leak slab data before hitting unmapped pages and causing a kernel panic.

Affecteddrivers/comedi/drivers/me_daq.c (COMEDI me_daq driver)

Vulnerability analysis

The me2600_xilinx_download() function trusts the file_length field from firmware headers without validating that the firmware buffer contains enough data. An attacker with root privileges can provide malicious firmware where file_length exceeds the actual data available, causing the kernel to read beyond the buffer boundary. Because file_length is a 32-bit value and is not capped against the buffer size, the read is effectively unbounded and will traverse adjacent kernel memory until it hits unmapped pages, resulting in a kernel panic. The fix adds proper bounds checking to ensure that 16 + file_length does not exceed the total firmware size before proceeding with the download.

03

BranchFixed inPatch commit
5.105.10.2532fc25a4c2e05
5.155.15.2039f39fa07259e
6.16.1.168f3f8ec00cfb8
6.126.12.811bf8761eb59e
6.186.18.22a47ae40339c1
6.196.19.12c8c607a77aab
6.66.6.134c16ac4e173a0
mainline7.0cc797d4821c7