CVE-2026-138926
published high CVSS 3.1 · 7.1dm: fix a bug in dm_accept_partial_bio
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux8b211aaccb915bbf4f4a68f1910c4de701df393b to < 423436c324664aa98dcfca2042832eba3a9c746d · 8b211aaccb915bbf4f4a68f1910c4de701df393b to < 182b0763365ddf3a7254a6df7a125ebb361499a2 · 8b211aaccb915bbf4f4a68f1910c4de701df393b to < ae3cf25c6fbed9ad71d5cdb5409d0f5f9bdd9d51 · 8b211aaccb915bbf4f4a68f1910c4de701df393b to < affc1ebd65f517897f1c092fb87f2c42f0fc41f5 · 8b211aaccb915bbf4f4a68f1910c4de701df393b to < 16802c8e3d7f63833f8bb96d159450544c529e50 · 8b211aaccb915bbf4f4a68f1910c4de701df393b to < a279804752e6c767b7f9ecbb32a15bdfd2b80aea · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux6.0 (affected) · 0 to < 6.0 (unaffected · semver) · 6.1.193 through 6.1.* (unaffected · semver) · 6.6.163 through 6.6.* (unaffected · semver) · 6.12.117 through 6.12.* (unaffected · semver) · 6.18.63 through 6.18.* (unaffected · semver) · 7.3.4 through 7.3.* (unaffected · semver) · 7.4-rc1 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.1 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:L
- Scenarios
- en: AV:N - dm_accept_partial_bio() sets io->sectors to region 2 only, so dm_split_and_process_bio()'s bio_trim(bio, io->sectors, ci.sector_count) skips the bio's region-1-sized tail. With a pmem dm-writecache LV behind nvmet-tcp, an initiator's NVMe Read lands in nvmet_tcp_map_data()'s sgl_alloc() pages via nvmet_bdev_execute_rw(), and the never-filled tail is returned to it in C2HData PDUs. AC:H - Only dm-writecache in pmem ('p') mode advances the clone (bio_copy_block on read hits) before calling dm_accept_partial_bio() (writecache_map_remap_origin on the following miss). This needs an admin-built table on a DAX-synchronous pmem cache device, a rare deployment the attacker cannot create, though it can then lay out hit/miss/hit blocks with its own Writes. PR:L - Loading the writecache table needs CAP_SYS_ADMIN in the init namespace (capable() in dm-ioctl ctl_ioctl), which is admin setup. Triggering needs only read/write access to the volume: an NVMe-oF host allowed on the namespace, or a local user with file access on a filesystem on it. UI:N - The attacker writes blocks A and C (pmem-mode writecache_map_write() caches them), leaves B uncached, then issues one read spanning A..C. No victim action is involved. S:U - The stale-data disclosure and the lost or garbage I/O happen inside the host kernel's dm/block layer serving that volume. No VM, container or IOMMU boundary is crossed. C:H - The skipped tail's pages (nvmet sgl_alloc() buffers or readahead folios, neither zeroed without init_on_alloc) complete as a successful read, returning stale contents of previously freed pages. The leak size equals the attacker-chosen run of leading cache hits and repeats on every such read. I:H - The same trim mismatch makes WRITEs in cleaner or metadata_only mode (direct_write -> writecache_map_remap_origin) drop their tail while reporting success, and reads mark unfilled pages uptodate as valid data. The fix commit reports mkfs.ext4/fsck.ext4 corruption on a pmem writecache. A:L - No crash or hang: bio_trim()'s bounds still hold and no BUG_ON in dm_accept_partial_bio() fires. Availability is degraded through wrong data and lost writes that need fsck or repair, not through a kernel fault.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 8b211aaccb915bbf4f4a68f1910c4de701df393b to < 423436c324664aa98dcfca2042832eba3a9c746d (affected · git)8b211aaccb915bbf4f4a68f1910c4de701df393b to < 182b0763365ddf3a7254a6df7a125ebb361499a2 (affected · git)8b211aaccb915bbf4f4a68f1910c4de701df393b to < ae3cf25c6fbed9ad71d5cdb5409d0f5f9bdd9d51 (affected · git)8b211aaccb915bbf4f4a68f1910c4de701df393b to < affc1ebd65f517897f1c092fb87f2c42f0fc41f5 (affected · git)8b211aaccb915bbf4f4a68f1910c4de701df393b to < 16802c8e3d7f63833f8bb96d159450544c529e50 (affected · git)8b211aaccb915bbf4f4a68f1910c4de701df393b to < a279804752e6c767b7f9ecbb32a15bdfd2b80aea (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 6.0 (affected)0 to < 6.0 (unaffected · semver)6.1.193 through 6.1.* (unaffected · semver)6.6.163 through 6.6.* (unaffected · semver)6.12.117 through 6.12.* (unaffected · semver)6.18.63 through 6.18.* (unaffected · semver)7.3.4 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
6- https://git.kernel.org/stable/c/16802c8e3d7f63833f8bb96d159450544c529e50
- https://git.kernel.org/stable/c/182b0763365ddf3a7254a6df7a125ebb361499a2
- https://git.kernel.org/stable/c/423436c324664aa98dcfca2042832eba3a9c746d
- https://git.kernel.org/stable/c/a279804752e6c767b7f9ecbb32a15bdfd2b80aea
- https://git.kernel.org/stable/c/ae3cf25c6fbed9ad71d5cdb5409d0f5f9bdd9d51
- https://git.kernel.org/stable/c/affc1ebd65f517897f1c092fb87f2c42f0fc41f5
Provider assertions
1Linux · cna
dm: fix a bug in dm_accept_partial_bio
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 5fc7f151ba08ad5fd99c59ab7cb63d175d24d3400020e255395c28f981d956a9
- Ingested
- 01 Dec 2026, 05:47:22 UTC
- Source record
- Official CVE record