CVE-2026-138926

dm: fix a bug in dm_accept_partial_bio

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

dm: fix a bug in dm_accept_partial_bio

dm-writecache doesn't work in pmem mode - mkfs.ext4 and the following
fsck.ext4 fail with data corruption reported.

The commit 7dd76d1feec7 ("dm: improve bio splitting and associated IO
accounting") introduced a latent bug in dm_accept_partial_bio - it set
tio->io->sectors = n_sectors;. This is incorrect, according to the
diagram in the source code at dm_accept_partial_bio, it should be the
size of regions 1+2, not the region 2 alone.

The latent bug become real bug with the commit 8b211aaccb91 ("dm: add two
stage requeue mechanism").

dm-writecache in pmem mode is the only target that actually advances bio
with bio_advance and then calls dm_accept_partial_bio (so, the region 1
is non-empty). All the other targets call dm_accept_partial_bio with
region 1 empty, so bug went unnoticed for so long.

Analysis

AI-generated

Technical impact

The Linux kernel has a logic flaw in the dm_accept_partial_bio function where the I/O sectors count is set incorrectly, causing writes to be misaccounted. This bug results in data corruption when the dm-writecache target operates in pmem mode, leading to filesystem corruption during mkfs or fsck operations.

Affected Systems

All Linux kernel versions that include the commit 7dd76d1feec7 and prior to the fix introduced in commit 8b211aaccb91 are affected. The flaw manifests only when dm-writecache operates in pmem mode; other dm targets remain unaffected.

Risk and Exploitability

The vulnerability is likely local, requiring write access to the dm-writecache device in pmem mode. An attacker with such privileges can trigger data corruption, potentially causing loss of critical information. There are no publicly available exploitation scripts, the EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog, but the impact of data loss warrants immediate attention.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the kernel patch that fixes dm_accept_partial_bio (commit 8b211aaccb91).
  • Reboot affected systems to load the updated kernel, ensuring the patch is active in the running kernel.
  • Until the patch is applied, avoid using dm-writecache in pmem mode; consider disabling pmem mode or using an alternative caching mechanism.

Generated by OpenCVE AI on November 30, 2026 at 18:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-680
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: dm: fix a bug in dm_accept_partial_bio dm-writecache doesn't work in pmem mode - mkfs.ext4 and the following fsck.ext4 fail with data corruption reported. The commit 7dd76d1feec7 ("dm: improve bio splitting and associated IO accounting") introduced a latent bug in dm_accept_partial_bio - it set tio->io->sectors = n_sectors;. This is incorrect, according to the diagram in the source code at dm_accept_partial_bio, it should be the size of regions 1+2, not the region 2 alone. The latent bug become real bug with the commit 8b211aaccb91 ("dm: add two stage requeue mechanism"). dm-writecache in pmem mode is the only target that actually advances bio with bio_advance and then calls dm_accept_partial_bio (so, the region 1 is non-empty). All the other targets call dm_accept_partial_bio with region 1 empty, so bug went unnoticed for so long.
Title dm: fix a bug in dm_accept_partial_bio
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-680

    Integer Overflow to Buffer Overflow

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:26 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:17 PM
Modified
Nov 30, 2026, 2:17 PM