CVE Database›CVE-2022-50549

CVE-2022-50549

kernel: dm thin: Fix ABBA deadlock between shrink_slab and dm_pool_abort_metadata

Loading…

Severity

Low

Red Hat Product Security

5.5

CVSS 3.1

Review impact separately from score.

Published · October 7, 2025

Updated · June 30, 2026

Description

An ABBA deadlock flaw was found in the Linux kernel's device-mapper thin provisioning subsystem between the memory reclaim path and metadata abort handling. A local user can trigger this issue by initiating cache drop operations while dm-thin operations are active, causing process P1 to hold shrinker_rwsem and wait for pmd->root_lock while process P2 holds pmd->root_lock and waits for shrinker_rwsem during metadata abort. This results in a deadlock manifesting as hung tasks and system unresponsiveness, leading to denial of service.

Statement

The deadlock occurs through a specific interaction between memory management and device-mapper operations. When cache is dropped (via /proc/sys/vm/drop_caches), the shrink_slab path acquires shrinker_rwsem for reading, then processes filesystem operations that may involve dm-thin devices. Concurrently, when dm-thin metadata operations fail, the dm_pool_abort_metadata function acquires pmd->root_lock, destroys the block manager (which unregisters a shrinker), and attempts to acquire shrinker_rwsem for writing. Meanwhile, thin_map operations acquire pmd->root_lock for reading. This creates an ABBA deadlock: P1 holds shrinker_rwsem→waits for pmd->root_lock, P2 holds pmd->root_lock→waits for shrinker_rwsem.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

To mitigate this issue, prevent the dm_thin_pool module from being loaded. See https://access.redhat.com/solutions/41278 for instructions on blacklisting kernel modules.

CVSS / CWE

CVSS 3.1 · 5.5
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

CWE-833 · Deadlock