{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2021-47113","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2024-03-04T18:12:48.836Z","datePublished":"2024-03-15T20:14:21.300Z","dateUpdated":"2026-08-05T08:46:06.772Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T08:46:06.772Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: abort in rename_exchange if we fail to insert the second ref\n\nError injection stress uncovered a problem where we'd leave a dangling\ninode ref if we failed during a rename_exchange.  This happens because\nwe insert the inode ref for one side of the rename, and then for the\nother side.  If this second inode ref insert fails we'll leave the first\none dangling and leave a corrupt file system behind.  Fix this by\naborting if we did the insert for the first inode ref."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","baseScore":7.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The bug is only in btrfs_rename_exchange, reached via local renameat2(RENAME_EXCHANGE) → vfs_rename → btrfs_rename2. nfsd and ksmbd call vfs_rename without RENAME_EXCHANGE, so there is no network protocol path into this function.\nAC:L - An attacker who can call rename_exchange on two entries they control can induce second-insert failure via memory or metadata pressure (ENOMEM/ENOSPC/EIO paths in btrfs_insert_inode_ref), matching how analogous unaborted-transaction bugs were scored; under uncertainty AC:L is required.\nPR:L - vfs_rename only requires ordinary directory write/exec (may_delete/may_create) on an already-mounted btrfs volume; an unprivileged user with a writable directory does not need init-namespace root or capabilities.\nUI:N - No separate victim action is required once btrfs is mounted (common for home/container/NAS volumes); the attacker triggers the bug solely through their own renameat2(RENAME_EXCHANGE) calls.\nS:U - Impact is durable corruption of the host btrfs instance within the same kernel/OS security authority; there is no VM escape, IOMMU bypass, or other cross-boundary effect.\nC:N - The defect commits a dangling inode_ref (on-disk metadata inconsistency) and provides no OOB/UAF read or other kernel or cross-user information-disclosure primitive.\nI:H - Without aborting after the first successful inode_ref insert, btrfs_end_transaction can allow that partial change to commit, leaving durable filesystem corruption (dangling inode refs), which is high integrity impact on FS metadata.\nA:H - Committed inode-ref corruption can break later unlink/lookup/balance/scrub paths and destabilize the shared volume for all users, constituting high availability impact comparable to other unaborted btrfs transaction bugs."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/inode.c"],"versions":[{"version":"cdd1fedf8261cd7a73c0596298902ff4f0f04492","lessThan":"0df50d47d17401f9f140dfbe752a65e5d72f9932","status":"affected","versionType":"git"},{"version":"cdd1fedf8261cd7a73c0596298902ff4f0f04492","lessThan":"ff8de2cec65a8c8521faade12a31b39c80e49f5b","status":"affected","versionType":"git"},{"version":"cdd1fedf8261cd7a73c0596298902ff4f0f04492","lessThan":"dc09ef3562726cd520c8338c1640872a60187af5","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/inode.c"],"versions":[{"version":"4.7","status":"affected"},{"version":"0","lessThan":"4.7","status":"unaffected","versionType":"semver"},{"version":"5.10.43","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.12.10","lessThanOrEqual":"5.12.*","status":"unaffected","versionType":"semver"},{"version":"5.13","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.7","versionEndExcluding":"5.10.43"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.7","versionEndExcluding":"5.12.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.7","versionEndExcluding":"5.13"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/0df50d47d17401f9f140dfbe752a65e5d72f9932"},{"url":"https://git.kernel.org/stable/c/ff8de2cec65a8c8521faade12a31b39c80e49f5b"},{"url":"https://git.kernel.org/stable/c/dc09ef3562726cd520c8338c1640872a60187af5"}],"title":"btrfs: abort in rename_exchange if we fail to insert the second ref","x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2021-47113","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-03-18T15:16:26.695834Z"}}}],"providerMetadata":{"orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP","dateUpdated":"2024-06-04T17:14:51.773Z"}},{"providerMetadata":{"orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE","dateUpdated":"2024-08-04T05:24:39.855Z"},"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/0df50d47d17401f9f140dfbe752a65e5d72f9932","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/ff8de2cec65a8c8521faade12a31b39c80e49f5b","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/dc09ef3562726cd520c8338c1640872a60187af5","tags":["x_transferred"]}]}]}}