dm-era: fix shadowed superblock leak on take-snap failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ eec40579d84873dfb7021eb24c50360f073237c5 · < 36ff918637e3517f732188a3c39dbeae5b9cfb1b| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
dm-era: fix shadowed superblock leak on take-snap failure
metadata_take_snap() bumps the live superblock refcount and then dm_tm_shadow_block() allocates a new block for the metadata snapshot. If the subsequent dm_sm_inc_block() of writeset_tree_root or era_array_root fails, the function only unlocks the clone and returns. The newly allocated shadow block is never returned to the metadata space map, so each failed take-snap permanently leaks one metadata block.
Free the clone with dm_sm_dec_block() on those error paths, matching the final step of metadata_drop_snap().
From the CVE record · Linux
In the Linux kernel's dm-era component, a failed metadata snapshot can permanently leak a metadata block. The leak occurs if incrementing either the writeset tree root or era array root fails after a shadow block is allocated. The input does not specify an attacker path, authentication requirements, or user interaction.
Engineers running Linux kernels with dm-era should check their installations; affected versions are not specified.