CVE-2026-143019
Received Received - Intake

dm snapshot discard handling vulnerability leading to data corruption

Vulnerability report for CVE-2026-143019, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-12-03

Last updated on: 2026-12-03

Assigner: kernel.org

Description

In the Linux kernel, the following vulnerability has been resolved: dm snapshot: fix discard writing into the next COW chunk zero_exception() zeroes one chunk of the COW device and takes the start sector from bio->bi_iter.bi_sector. remap_exception() has already set that to the COW chunk start plus the offset inside the chunk. That offset is needed for reads and writes, but for a discard it is wrong: the zeroing window is shifted, so the head of the target chunk keeps its old data and the tail lands in the next COW chunk, which holds a different exception. io_overlaps_chunk() should have caught this, but it only compares the length. "maps to entire chunks" in snapshot.rst also means the discard has to start on a chunk boundary. A discard that is not a full chunk has a second problem: after remap_exception() it is sent to the COW device, where it hits a chunk that still backs a live exception. After a discard the contents are undefined, but the exception stays in the table and keeps pointing at that chunk, so a later read returns whatever the discard left instead of the snapshot's data. Reproducer: truncate -s 4M o.img c.img o=$(losetup -f --show o.img) c=$(losetup -f --show c.img) dmsetup create snap --table \ "0 8192 snapshot $o $c P 512 1 discard_zeroes_cow" # write two chunks, this creates two exceptions head -c 256K /dev/zero | tr '\000' '\252' > pat dd if=pat of=/dev/mapper/snap bs=256K seek=1 count=1 conv=notrunc dd if=pat of=/dev/mapper/snap bs=256K seek=2 count=1 conv=notrunc # shift the snapshot by 8 sectors, so a discard that is aligned on # top is unaligned inside the snapshot dmsetup create top --table "0 8184 linear /dev/mapper/snap 8" blkdiscard -o 262144 -l 262144 /dev/mapper/top sync echo 3 > /proc/sys/vm/drop_caches # chunk 1 dd if=/dev/mapper/snap bs=512 skip=512 count=8 | od -An -tx1 -N1 # chunk 2 dd if=/dev/mapper/snap bs=512 skip=1024 count=8 | od -An -tx1 -N1 Before: aa 00 <- chunk 2 was zeroed although it was not discarded After: aa aa <- nothing written, a discard is only a hint Fix it by requiring the discard to start on a chunk boundary in io_overlaps_chunk(), and by finishing a discard that is not a full chunk with bio_endio() instead of passing it down to the COW device.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-12-03
Last Modified
2026-12-03
Generated
2026-12-03
AI Q&A
2026-12-03
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
linux linux_kernel *

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability in the Linux kernel involves the device-mapper snapshot feature. When a discard operation is performed on a snapshot device, it incorrectly writes zeros into the next copy-on-write (COW) chunk instead of the intended one. This happens because the discard operation's start sector is misaligned due to prior adjustments by remap_exception(). The issue affects data integrity in snapshots, as discarded chunks may retain old data or be incorrectly zeroed.

Detection Guidance

This vulnerability is specific to the Linux kernel's device mapper snapshot functionality. Detection requires checking if your system uses dm-snapshot with discard_zeroes_cow enabled. Inspect kernel logs for discard-related errors or run the provided reproducer to test your setup.

Impact Analysis

If you use Linux device-mapper snapshots with discard_zeroes_cow enabled, this flaw could corrupt snapshot data. Discard operations may unintentionally zero out the wrong chunks, leading to data loss or incorrect data being read from snapshots. Systems relying on consistent snapshot backups or live data recovery could experience failures or inconsistencies.

Mitigation Strategies

Apply the Linux kernel patch that fixes this issue. Disable discard_zeroes_cow in dm-snapshot configurations. Monitor for discard operations on snapshot devices and ensure they align with chunk boundaries.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-143019. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...