KernelScan.io

HIGH Introduced in 4.7

dasd FormatCheck Overflow

CVE-2026-80710

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 AI7.7HIGH

01

In the Linux kernel, the following vulnerability has been resolved: s390/dasd: Fix undersized format-check buffer fmt_buffer_size in dasd_eckd_check_device_format() is declared as int, even though one of the multiplicands, sizeof(struct eckd_count), is a size_t. The expression trkcount * rpt_max * sizeof(struct eckd_count) is therefore correctly evaluated at 64-bit width, but the result is silently truncated when it is stored back into the 32-bit fmt_buffer_size variable. For a sufficiently large track range (start_unit/stop_unit are caller-controlled) this truncation yields a buffer size far smaller than the number of tracks actually requested. kzalloc() then succeeds with an undersized allocation, while the subsequent channel program build still operates on the untruncated track count and writes past the end of that buffer. Compute the buffer size with check_mul_overflow() and keep it in a size_t, so that a value that no longer fits results in -EINVAL instead of a silently truncated allocation size.

02

Engine v0.6.0

Risk summary

A local user on an s390 system with DASD ECKD storage can trigger a heap buffer overflow by issuing a format-check ioctl with a sufficiently large track range. The integer truncation in the buffer size calculation causes an undersized allocation, and the subsequent write operation overflows the heap buffer, potentially leading to kernel code execution or a system crash.

Affecteddrivers/s390/block/dasd_eckd.c (s390 DASD ECKD block driver)

Vulnerability analysis

A format-check operation on a DASD ECKD device multiplies track count, records per track, and a structure size to decide how much memory to allocate, but the result is silently truncated when stored in a variable that is too small. A caller who supplies a large track range causes a successful allocation that is far smaller than needed, while the code that fills the buffer still uses the original untruncated count and writes past the end of the allocated memory. The corrected code checks for multiplication overflow and keeps the size in a wide enough type, failing the request safely when the product would not fit. This can be triggered by issuing an ioctl on a DASD block device node, reachable by a local user with access to the device on s390 hardware.

03

BranchIntroducedFixed inPatch commit
6.64.76.6.151aca18289c86f
6.124.76.12.1039f88dda2f229
6.184.76.18.44e16e0fc54120
mainline4.77.27f40b346462f
7.14.77.1.887f3389cd392
cip/6.124.76.12.104-cip309f88dda2f229