Cloudanix VulnDB

CVE-2021-47343

None

CVSS

—

EPSS

0.3%

Published

May 21, 2024

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A bug in Linux storage code can cause crashes or memory problems when an input/output error happens during certain internal cleanup steps.

Exploitation
Local Privilege
Attacker needs
Local User
Complexity
Moderate
Impact
Denial Of Service
Component
OS kernel
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

In the Linux kernel dm btree remove path, remove_raw() failure from an IO read error leaves shadow_spine::root uninitialized; the uninitialized value is then assigned to new_root, so pmd->details_root or pmd->root holds an invalid pointer that later triggers out-of-bounds memory access or a general protection fault when the details_info tree is read.

Why it matters to the business

Storage management operations on Linux systems using device-mapper thin provisioning can crash or corrupt memory, causing downtime, loss of thin-pool metadata access, and potential data-integrity problems during routine device deletion or pool maintenance.

How an attack unfolds

An attacker with local access that can issue device-mapper messages or induce IO errors during btree removal triggers the uninitialized-root assignment; subsequent metadata operations then dereference the invalid pointer, resulting in a kernel fault that may be turned into memory corruption for privilege escalation.

How to fix it

Upgrade the Linux kernel to a version containing the upstream fix that only assigns new_root after successful removal; apply the patch or distribution kernel update that resolves the assignment of uninitialized shadow_spine::root.

How to confirm the fix worked

Confirm the running kernel contains the commit that gates the new_root assignment on removal success; reproduce a dm btree remove under injected IO error and verify no uninitialized pointer is propagated to pmd structures; inspect kernel logs for absence of the described general protection fault in metadata_ll_load_ie.

Typical attack path

  1. Obtain local access and issue dm-pool delete or equivalent thin-device message
  2. Force or wait for an IO read error inside remove_raw() during shadowing
  3. Allow the uninitialized root value to be written into pmd->root or pmd->details_root
  4. Trigger a follow-on read of the details_info tree that dereferences the invalid pointer

How to detect it

Search kernel logs and crash dumps for general protection faults referencing metadata_ll_load_ie, sm_metadata_count_is_more_than_one, or dm_btree_remove; correlate with preceding device-mapper ioctl or pool-message activity that performs thin-device deletion.

  • metadata_ll_load_ie+0x14/0x30
  • general protection fault, probably for non-canonical address
  • dm_btree_remove+0xf4/0x1c0
  • dm_pool_delete_thin_device+0xc3/0x140
  • pool_message+0x218/0x2b0

What your security team should do

  • Prioritize kernel updates on systems using dm-thin provisioning
  • Harden IO paths and monitor for unexpected read errors on thin-pool metadata devices
  • Review device-mapper message audit logs for unusual thin-device deletion activity

The record

In the Linux kernel, the following vulnerability has been resolved: dm btree remove: assign new_root only when removal succeeds remove_raw() in dm_btree_remove() may fail due to IO read error (e.g. read the content of origin block fails during shadowing), and the value of shadow_spine::root is uninitialized, but the uninitialized value is still assign to new_root in the end of dm_btree_remove(). For dm-thin, the value of pmd->details_root or pmd->root will become an uninitialized value, so if trying to read details_info tree again out-of-bound memory may occur as showed below: general protection fault, probably for non-canonical address 0x3fdcb14c8d7520 CPU: 4 PID: 515 Comm: dmsetup Not tainted 5.13.0-rc6 Hardware name: QEMU Standard PC RIP: 0010:metadata_ll_load_ie+0x14/0x30 Call Trace: sm_metadata_count_is_more_than_one+0xb9/0xe0 dm_tm_shadow_block+0x52/0x1c0 shadow_step+0x59/0xf0 remove_raw+0xb2/0x170 dm_btree_remove+0xf4/0x1c0 dm_pool_delete_thin_device+0xc3/0x140 pool_message+0x218/0x2b0 target_message+0x251/0x290 ctl_ioctl+0x1c4/0x4d0 dm_ctl_ioctl+0xe/0x20 __x64_sys_ioctl+0x7b/0xb0 do_syscall_64+0x40/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xae Fixing it by only assign new_root when removal succeeds

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 linux 0 5.10.70-1
Debian:12 linux 0 5.14.6-1
Debian:13 linux 0 5.14.6-1
SUSE:Enterprise Storage 7.1 kernel-64kb 0 5.3.18-150300.59.164.1
SUSE:Enterprise Storage 7.1 kernel-default 0 5.3.18-150300.59.164.1
SUSE:Enterprise Storage 7.1 kernel-default-base 0 5.3.18-150300.59.164.1.150300.18.96.1
SUSE:Enterprise Storage 7.1 kernel-docs 0 5.3.18-150300.59.164.1
SUSE:Enterprise Storage 7.1 kernel-obs-build 0 5.3.18-150300.59.164.1
SUSE:Enterprise Storage 7.1 kernel-preempt 0 5.3.18-150300.59.164.1
SUSE:Enterprise Storage 7.1 kernel-source 0 5.3.18-150300.59.164.1
SUSE:Enterprise Storage 7.1 kernel-syms 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise High Availability Extension 12 SP5 kernel-default 0 4.12.14-122.219.1
SUSE:Linux Enterprise High Availability Extension 15 SP3 kernel-default 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS kernel-64kb 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS kernel-default 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS kernel-default-base 0 5.3.18-150300.59.164.1.150300.18.96.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS kernel-docs 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS kernel-obs-build 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS kernel-preempt 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS kernel-source 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS kernel-syms 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise Live Patching 12 SP5 kernel-default 0 4.12.14-122.219.1
SUSE:Linux Enterprise Live Patching 12 SP5 kgraft-patch-SLE12-SP5_Update_57 0 1-8.3.1
SUSE:Linux Enterprise Live Patching 15 SP3 kernel-default 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise Live Patching 15 SP3 kernel-livepatch-SLE15-SP3_Update_45 0 1-150300.7.3.1
SUSE:Linux Enterprise Micro 5.1 kernel-default 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise Micro 5.1 kernel-default-base 0 5.3.18-150300.59.164.1.150300.18.96.1
SUSE:Linux Enterprise Micro 5.1 kernel-rt 0 5.3.18-150300.172.1
SUSE:Linux Enterprise Micro 5.1 kernel-source-rt 0 5.3.18-150300.172.1
SUSE:Linux Enterprise Micro 5.2 kernel-default 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise Micro 5.2 kernel-default-base 0 5.3.18-150300.59.164.1.150300.18.96.1
SUSE:Linux Enterprise Micro 5.2 kernel-rt 0 5.3.18-150300.172.1
SUSE:Linux Enterprise Micro 5.2 kernel-source-rt 0 5.3.18-150300.172.1
SUSE:Linux Enterprise Real Time 12 SP5 kernel-rt 0 4.12.14-10.188.1
SUSE:Linux Enterprise Real Time 12 SP5 kernel-rt_debug 0 4.12.14-10.188.1
SUSE:Linux Enterprise Real Time 12 SP5 kernel-source-rt 0 4.12.14-10.188.1
SUSE:Linux Enterprise Real Time 12 SP5 kernel-syms-rt 0 4.12.14-10.188.1
SUSE:Linux Enterprise Server 12 SP5 kernel-azure 0 4.12.14-16.188.1
SUSE:Linux Enterprise Server 12 SP5 kernel-default 0 4.12.14-122.219.1
SUSE:Linux Enterprise Server 12 SP5 kernel-source 0 4.12.14-122.219.1
SUSE:Linux Enterprise Server 12 SP5 kernel-source-azure 0 4.12.14-16.188.1
SUSE:Linux Enterprise Server 12 SP5 kernel-syms 0 4.12.14-122.219.1
SUSE:Linux Enterprise Server 12 SP5 kernel-syms-azure 0 4.12.14-16.188.1
SUSE:Linux Enterprise Server 15 SP3-LTSS kernel-64kb 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise Server 15 SP3-LTSS kernel-default 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise Server 15 SP3-LTSS kernel-default-base 0 5.3.18-150300.59.164.1.150300.18.96.1
SUSE:Linux Enterprise Server 15 SP3-LTSS kernel-docs 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise Server 15 SP3-LTSS kernel-obs-build 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise Server 15 SP3-LTSS kernel-preempt 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise Server 15 SP3-LTSS kernel-source 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise Server 15 SP3-LTSS kernel-syms 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise Server 15 SP3-LTSS kernel-zfcpdump 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 kernel-azure 0 4.12.14-16.188.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 kernel-default 0 4.12.14-122.219.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 kernel-source 0 4.12.14-122.219.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 kernel-source-azure 0 4.12.14-16.188.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 kernel-syms 0 4.12.14-122.219.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 kernel-syms-azure 0 4.12.14-16.188.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP3 kernel-default 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP3 kernel-default-base 0 5.3.18-150300.59.164.1.150300.18.96.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP3 kernel-docs 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP3 kernel-obs-build 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP3 kernel-preempt 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP3 kernel-source 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP3 kernel-syms 0 5.3.18-150300.59.164.1
SUSE:Linux Enterprise Software Development Kit 12 SP5 kernel-docs 0 4.12.14-122.219.1
SUSE:Linux Enterprise Software Development Kit 12 SP5 kernel-obs-build 0 4.12.14-122.219.1
SUSE:Linux Enterprise Workstation Extension 12 SP5 kernel-default 0 4.12.14-122.219.1
Ubuntu:16.04:LTS linux-hwe-edge 0 No fix
Ubuntu:18.04:LTS linux 0 4.15.0-156.163
Ubuntu:18.04:LTS linux-aws 0 4.15.0-1111.118
Ubuntu:18.04:LTS linux-aws-5.0 0 No fix
Ubuntu:18.04:LTS linux-aws-5.3 0 No fix
Ubuntu:18.04:LTS linux-aws-5.4 0 5.4.0-1056.59~18.04.1
Ubuntu:18.04:LTS linux-azure 0 No fix
Ubuntu:18.04:LTS linux-azure-4.15 0 4.15.0-1123.136
Ubuntu:18.04:LTS linux-azure-5.3 0 No fix
Ubuntu:18.04:LTS linux-azure-5.4 0 5.4.0-1058.60~18.04.1
Ubuntu:18.04:LTS linux-azure-edge 0 No fix
Ubuntu:18.04:LTS linux-gcp 0 No fix
Ubuntu:18.04:LTS linux-gcp-4.15 0 4.15.0-1108.122
Ubuntu:18.04:LTS linux-gcp-5.3 0 No fix
Ubuntu:18.04:LTS linux-gcp-5.4 0 5.4.0-1052.56~18.04.1
Ubuntu:18.04:LTS linux-gke-4.15 0 No fix
Ubuntu:18.04:LTS linux-gke-5.4 0 No fix
Ubuntu:18.04:LTS linux-gkeop-5.4 0 No fix
Ubuntu:18.04:LTS linux-hwe 0 No fix
Ubuntu:18.04:LTS linux-hwe-5.4 0 5.4.0-84.94~18.04.1
Ubuntu:18.04:LTS linux-hwe-edge 0 No fix
Ubuntu:18.04:LTS linux-ibm-5.4 0 5.4.0-1010.11~18.04.2
Ubuntu:18.04:LTS linux-kvm 0 4.15.0-1099.101
Ubuntu:18.04:LTS linux-oem 0 No fix
Ubuntu:18.04:LTS linux-oracle 0 4.15.0-1080.88
Ubuntu:18.04:LTS linux-oracle-5.0 0 No fix
Ubuntu:18.04:LTS linux-oracle-5.3 0 No fix
Ubuntu:18.04:LTS linux-oracle-5.4 0 5.4.0-1054.58~18.04.1
Ubuntu:18.04:LTS linux-raspi-5.4 0 5.4.0-1043.47~18.04.1
Ubuntu:20.04:LTS linux 0 No fix
Ubuntu:20.04:LTS linux 0 5.4.0-84.94
Ubuntu:20.04:LTS linux-aws 0 No fix
Ubuntu:20.04:LTS linux-aws 0 5.4.0-1056.59
Ubuntu:20.04:LTS linux-aws-5.11 0 No fix
Ubuntu:20.04:LTS linux-aws-5.13 0 No fix
Ubuntu:20.04:LTS linux-aws-5.15 0 5.15.0-1014.18~20.04.1
Ubuntu:20.04:LTS linux-aws-5.8 0 No fix
Ubuntu:20.04:LTS linux-azure 0 No fix
Ubuntu:20.04:LTS linux-azure 0 5.4.0-1058.60
Ubuntu:20.04:LTS linux-azure-5.11 0 No fix
Ubuntu:20.04:LTS linux-azure-5.13 0 No fix
Ubuntu:20.04:LTS linux-azure-5.15 0 5.15.0-1007.8~20.04.1
Ubuntu:20.04:LTS linux-azure-5.8 0 No fix
Ubuntu:20.04:LTS linux-azure-fde 0 No fix
Ubuntu:20.04:LTS linux-azure-fde-5.15 0 5.15.0-1019.24~20.04.1.1
Ubuntu:20.04:LTS linux-bluefield 0 No fix
Ubuntu:20.04:LTS linux-bluefield 0 5.4.0-1019.22
Ubuntu:20.04:LTS linux-gcp 0 No fix
Ubuntu:20.04:LTS linux-gcp 0 5.4.0-1052.56
Ubuntu:20.04:LTS linux-gcp-5.11 0 No fix
Ubuntu:20.04:LTS linux-gcp-5.13 0 No fix
Ubuntu:20.04:LTS linux-gcp-5.15 0 5.15.0-1006.9~20.04.1
Ubuntu:20.04:LTS linux-gcp-5.8 0 No fix
Ubuntu:20.04:LTS linux-gke 0 No fix
Ubuntu:20.04:LTS linux-gke-5.15 0 No fix
Ubuntu:20.04:LTS linux-gkeop 0 No fix
Ubuntu:20.04:LTS linux-gkeop 0 5.4.0-1023.24
Ubuntu:20.04:LTS linux-gkeop-5.15 0 5.15.0-1003.5~20.04.2
Ubuntu:20.04:LTS linux-hwe-5.11 0 No fix
Ubuntu:20.04:LTS linux-hwe-5.13 0 No fix
Ubuntu:20.04:LTS linux-hwe-5.15 0 5.15.0-33.34~20.04.1
Ubuntu:20.04:LTS linux-hwe-5.8 0 No fix
Ubuntu:20.04:LTS linux-ibm 0 No fix
Ubuntu:20.04:LTS linux-ibm 0 5.4.0-1004.5
Ubuntu:20.04:LTS linux-ibm-5.15 0 5.15.0-1033.36~20.04.1
Ubuntu:20.04:LTS linux-intel-5.13 0 No fix
Ubuntu:20.04:LTS linux-intel-iotg-5.15 0 5.15.0-1003.5~20.04.1
Ubuntu:20.04:LTS linux-iot 0 5.4.0-1001.3
Ubuntu:20.04:LTS linux-kvm 0 No fix
Ubuntu:20.04:LTS linux-kvm 0 5.4.0-1046.48
Ubuntu:20.04:LTS linux-lowlatency-hwe-5.15 0 5.15.0-33.34~20.04.1
Ubuntu:20.04:LTS linux-oem-5.10 0 No fix
Ubuntu:20.04:LTS linux-oem-5.13 0 No fix
Ubuntu:20.04:LTS linux-oem-5.14 0 No fix
Ubuntu:20.04:LTS linux-oem-5.6 0 No fix
Ubuntu:20.04:LTS linux-oracle 0 No fix
Ubuntu:20.04:LTS linux-oracle 0 5.4.0-1054.58
Ubuntu:20.04:LTS linux-oracle-5.11 0 No fix
Ubuntu:20.04:LTS linux-oracle-5.13 0 No fix
Ubuntu:20.04:LTS linux-oracle-5.15 0 5.15.0-1007.9~20.04.1
Ubuntu:20.04:LTS linux-oracle-5.8 0 No fix
Ubuntu:20.04:LTS linux-raspi 0 No fix
Ubuntu:20.04:LTS linux-raspi 0 5.4.0-1043.47
Ubuntu:20.04:LTS linux-raspi2 0 No fix
Ubuntu:20.04:LTS linux-riscv 0 No fix
Ubuntu:20.04:LTS linux-riscv-5.11 0 No fix
Ubuntu:20.04:LTS linux-riscv-5.15 0 5.15.0-1015.17~20.04.1
Ubuntu:20.04:LTS linux-riscv-5.8 0 No fix
Ubuntu:20.04:LTS linux-xilinx-zynqmp 0 5.4.0-1020.24
Ubuntu:22.04:LTS linux 0 5.13.0-19.19
Ubuntu:22.04:LTS linux-allwinner-5.19 0 No fix
Ubuntu:22.04:LTS linux-aws 0 5.13.0-1005.6
Ubuntu:22.04:LTS linux-aws-5.19 0 No fix
Ubuntu:22.04:LTS linux-aws-6.2 0 No fix
Ubuntu:22.04:LTS linux-aws-6.5 0 6.5.0-1008.8~22.04.1
Ubuntu:22.04:LTS linux-aws-6.8 0 6.8.0-1009.9~22.04.2
Ubuntu:22.04:LTS linux-azure 0 5.13.0-1006.7
Ubuntu:22.04:LTS linux-azure-5.19 0 No fix
Ubuntu:22.04:LTS linux-azure-6.2 0 No fix
Ubuntu:22.04:LTS linux-azure-6.5 0 6.5.0-1007.7~22.04.1
Ubuntu:22.04:LTS linux-azure-6.8 0 6.8.0-1008.8~22.04.1
Ubuntu:22.04:LTS linux-azure-fde 0 5.15.0-1019.24.1
Ubuntu:22.04:LTS linux-azure-fde-5.19 0 No fix
Ubuntu:22.04:LTS linux-azure-fde-6.2 0 No fix
Ubuntu:22.04:LTS linux-gcp 0 5.13.0-1005.6
Ubuntu:22.04:LTS linux-gcp-5.19 0 No fix
Ubuntu:22.04:LTS linux-gcp-6.2 0 No fix
Ubuntu:22.04:LTS linux-gcp-6.5 0 6.5.0-1010.10~22.04.3
Ubuntu:22.04:LTS linux-gcp-6.8 0 6.8.0-1010.11~22.04.1
Ubuntu:22.04:LTS linux-gke 0 5.15.0-1002.2
Ubuntu:22.04:LTS linux-gkeop 0 5.15.0-1001.2
Ubuntu:22.04:LTS linux-hwe-5.19 0 No fix
Ubuntu:22.04:LTS linux-hwe-6.2 0 No fix
Ubuntu:22.04:LTS linux-hwe-6.5 0 6.5.0-14.14~22.04.1
Ubuntu:22.04:LTS linux-hwe-6.8 0 6.8.0-38.38~22.04.1
Ubuntu:22.04:LTS linux-ibm 0 5.15.0-1002.2
Ubuntu:22.04:LTS linux-intel-iot-realtime 0 No fix
Ubuntu:22.04:LTS linux-intel-iot-realtime 0 5.15.0-1021.26
Ubuntu:22.04:LTS linux-intel-iotg 0 5.15.0-1004.6
Ubuntu:22.04:LTS linux-kvm 0 5.13.0-1004.4
Ubuntu:22.04:LTS linux-lowlatency 0 5.15.0-22.22
Ubuntu:22.04:LTS linux-lowlatency-hwe-5.19 0 No fix
Ubuntu:22.04:LTS linux-lowlatency-hwe-6.2 0 No fix
Ubuntu:22.04:LTS linux-lowlatency-hwe-6.5 0 6.5.0-14.14.1~22.04.1
Ubuntu:22.04:LTS linux-lowlatency-hwe-6.8 0 6.8.0-38.38.1~22.04.2
Ubuntu:22.04:LTS linux-nvidia 0 5.15.0-1005.5
Ubuntu:22.04:LTS linux-nvidia-6.2 0 No fix
Ubuntu:22.04:LTS linux-nvidia-6.5 0 6.5.0-1004.4
Ubuntu:22.04:LTS linux-nvidia-6.8 0 6.8.0-1008.8~22.04.1
Ubuntu:22.04:LTS linux-oem-5.17 0 No fix
Ubuntu:22.04:LTS linux-oem-6.0 0 No fix
Ubuntu:22.04:LTS linux-oem-6.1 0 No fix

Related vulnerabilities