dm thin metadata: fix metadata snapshot consistency on commit failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 991d9fa02da0dd1f843dc011376965e0c8c6c9b5 · < 7f76245960a332f39b08cc556e675d1765dc5bbb| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
dm thin metadata: fix metadata snapshot consistency on commit failure
__reserve_metadata_snap() and __release_metadata_snap() modify the superblock's held_root directly in the block_manager's buffer. If the subsequent metadata commit fails, the held_root gets flushed to disk through the abort_transaction path, resulting in inconsistent metadata.
Reproducer 1: __reserve_metadata_snap()
1. Create a 2 MiB metadata device and make the region after the 14th block inaccessible, to trigger metadata commit failure in the subsequent reserve_metadata_snap operation. The 14th block will be the shadow destination for the index block.
dmsetup create tmeta --table "0 112 linear /dev/sdc 0 112 3984 error"
2. Create a 16 MiB thin-pool
dmsetup create tdata --table "0 32768 zero" dd if=/dev/zero of=/dev/mapper/tmeta bs=4k count=1 dmsetup create tpool --table "0 32768 thin-pool /dev/mapper/tmeta \ /dev/mapper/tdata 128 0 1 skip_block_zeroing"
From the CVE record · Linux
The Linux kernel’s dm thin metadata code can write an inconsistent held_root to disk if a metadata commit fails while reserving or releasing a metadata snapshot. A local user able to manage a thin pool could trigger this condition; the input does not specify authentication requirements beyond that access or any additional user interaction.
Operators running Linux kernels with dm thin metadata should check their systems; affected versions are not specified.