# CVE-2021-47343: dm btree remove: assign new\_root only when removal succeeds

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.33% (percentile 19, 2026-11-26)
- **CWE:** CWE-1188
- **Published:** 2024-05-21T14:35:50.293Z
- **Modified:** 2026-08-05T08:47:20.543Z

## Who should check

- Anyone running Linux \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< 4c84b3e0728ffe10d89c633694c35a02b5c477dc; \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< c154775619186781aaf8a99333ac07437a1768d5; \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< 73f27adaa73e3057a9ec464e33c4f54d34ea5de3; \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< 8fbae4a1bdb5b889490cdee929e68540151536e5; \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< 964d57d1962d7e68f0f578f05d9ae4a104d74851; \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< ba47e65a5de3e0e8270301a409fc63d3129fdb9e; \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< 89bf942314b78d454db92427201421b5dec132d9; \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< ad365e9351ac2b450e7e79932ff6abf59342d91a; \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< b6e58b5466b2959f83034bead2e2e1395cca8aeb
- Anyone running Linux 3.2

## Description

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 and fixed versions

- Linux: \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< 4c84b3e0728ffe10d89c633694c35a02b5c477dc; \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< c154775619186781aaf8a99333ac07437a1768d5; \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< 73f27adaa73e3057a9ec464e33c4f54d34ea5de3; \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< 8fbae4a1bdb5b889490cdee929e68540151536e5; \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< 964d57d1962d7e68f0f578f05d9ae4a104d74851; \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< ba47e65a5de3e0e8270301a409fc63d3129fdb9e; \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< 89bf942314b78d454db92427201421b5dec132d9; \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< ad365e9351ac2b450e7e79932ff6abf59342d91a; \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< b6e58b5466b2959f83034bead2e2e1395cca8aeb (cvelist)
- Linux: 3.2 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2021-47343. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-47343.md
Affected: Linux >= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, < 4c84b3e0728ffe10d89c633694c35a02b5c477dc; >= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, < c154775619186781aaf8a99333ac07437a1768d5; >= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, < 73f27adaa73e3057a9ec464e33c4f54d34ea5de3; >= 3241b1d3e0aaafbfcd320f4…
Fixed in: Linux 4c84b3e0728ffe10d89c633694c35a02b5c477dc, Linux 73f27adaa73e3057a9ec464e33c4f54d34ea5de3, Linux 8fbae4a1bdb5b889490cdee929e68540151536e5, Linux 964d57d1962d7e68f0f578f05d9ae4a104d74851, Linux 89bf942314b78d454db92427201421b5dec132d9

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2021-47343 being exploited?

There is no confirmed exploitation: CVE-2021-47343 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.33% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2021-47343?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2021-47343?

Linux \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< 4c84b3e0728ffe10d89c633694c35a02b5c477dc; \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< c154775619186781aaf8a99333ac07437a1768d5; \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< 73f27adaa73e3057a9ec464e33c4f54d34ea5de3; \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< 8fbae4a1bdb5b889490cdee929e68540151536e5; \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< 964d57d1962d7e68f0f578f05d9ae4a104d74851; \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< ba47e65a5de3e0e8270301a409fc63d3129fdb9e; \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< 89bf942314b78d454db92427201421b5dec132d9; \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< ad365e9351ac2b450e7e79932ff6abf59342d91a; \>= 3241b1d3e0aaafbfcd320f4d71ade629728cc4f4, \< b6e58b5466b2959f83034bead2e2e1395cca8aeb; Linux 3.2.

### Is there a fix for CVE-2021-47343?

Yes. Fixed in Linux 4c84b3e0728ffe10d89c633694c35a02b5c477dc, Linux 73f27adaa73e3057a9ec464e33c4f54d34ea5de3, Linux 8fbae4a1bdb5b889490cdee929e68540151536e5, Linux 964d57d1962d7e68f0f578f05d9ae4a104d74851, Linux 89bf942314b78d454db92427201421b5dec132d9. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2021-47343?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/4c84b3e0728ffe10d89c633694c35a02b5c477dc>
- patch: <https://git.kernel.org/stable/c/c154775619186781aaf8a99333ac07437a1768d5>
- patch: <https://git.kernel.org/stable/c/73f27adaa73e3057a9ec464e33c4f54d34ea5de3>
- patch: <https://git.kernel.org/stable/c/8fbae4a1bdb5b889490cdee929e68540151536e5>
- patch: <https://git.kernel.org/stable/c/964d57d1962d7e68f0f578f05d9ae4a104d74851>
- patch: <https://git.kernel.org/stable/c/ba47e65a5de3e0e8270301a409fc63d3129fdb9e>
- patch: <https://git.kernel.org/stable/c/89bf942314b78d454db92427201421b5dec132d9>
- patch: <https://git.kernel.org/stable/c/ad365e9351ac2b450e7e79932ff6abf59342d91a>
- patch: <https://git.kernel.org/stable/c/b6e58b5466b2959f83034bead2e2e1395cca8aeb>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-47343>

HTML: <https://flawdb.com/CVE-2021-47343> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-47343>
