CyberRota Analysis
AI-GeneratedThe vulnerability affects the Linux kernel's dm-integrity module, which is susceptible to a buffer overflow during the processing of keyed discard operations. This flaw can lead to memory corruption, potentially allowing an attacker to execute arbitrary code or cause a denial of service. Linux system administrators and developers using affected versions of the kernel should prioritize applying the patch to mitigate these risks.
Original NVD Description
In the Linux kernel, the following vulnerability has been resolved: dm-integrity: fix buffer overflow with keyed discard Since commit 68c5c42567bc ("dm-integrity: replace forgeable discard filler with a keyed sector marker"), integrity_metadata computes a checksum for every discarded block into the "checksums" buffer. integrity_sector_checksum always writes the whole digest. So if the tag size is smaller than the digest size, the checksum of the last block that fits into the buffer is written past the end of it. For example, with hmac(sha256) and tag size 16, a 4MiB discard writes 16 bytes past the kmalloc'ed page. Fix this by subtracting extra_space from the buffer size when computing max_blocks, like we do for writes.