# CVE-2021-47113: btrfs: abort in rename_exchange if we fail to insert the second ref

- Severity: High 7.1 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.27%, higher than 20% of CVEs (2026-12-01)
- Published: 2024-03-15T20:14:21.300Z
- Modified: 2026-08-05T08:46:06.772Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

btrfs: abort in rename_exchange if we fail to insert the second ref

Error injection stress uncovered a problem where we'd leave a dangling
inode ref if we failed during a rename_exchange.  This happens because
we insert the inode ref for one side of the rename, and then for the
other side.  If this second inode ref insert fails we'll leave the first
one dangling and leave a corrupt file system behind.  Fix this by
aborting if we did the insert for the first inode ref.

(As written by CVE List.)

## Affected

- Linux Linux: from cdd1fedf8261cd7a73c0596298902ff4f0f04492 before 0df50d47d17401f9f140dfbe752a65e5d72f9932; from cdd1fedf8261cd7a73c0596298902ff4f0f04492 before ff8de2cec65a8c8521faade12a31b39c80e49f5b; from cdd1fedf8261cd7a73c0596298902ff4f0f04492 before dc09ef3562726cd520c8338c1640872a60187af5; 4.7 (not affected: before 4.7; from 5.10.43 up to 5.10.*; from 5.12.10 up to 5.12.*; from 5.13 up to *)
- linux linux_kernel: before 5.10.43; from 5.11 before 5.12.10; 5.13

## Every score

- Linux: CVSS:3.1 7.1 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/0df50d47d17401f9f140dfbe752a65e5d72f9932> (patch)
- <https://git.kernel.org/stable/c/ff8de2cec65a8c8521faade12a31b39c80e49f5b> (patch)
- <https://git.kernel.org/stable/c/dc09ef3562726cd520c8338c1640872a60187af5> (patch)

## Sources

- CVE List: [CVE-2021-47113](https://www.cve.org/CVERecord?id=CVE-2021-47113), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2021-47113](https://nvd.nist.gov/vuln/detail/CVE-2021-47113), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2021-47113 · Whole record: https://cve.day/CVE-2021-47113.json · Rebuilt by cve.day 2026-11-25T22:58:08.667Z
