{"id":"CVE-2022-49914","state":"PUBLISHED","title":"btrfs: fix inode list leak during backref walking at resolve_indirect_refs()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: fix inode list leak during backref walking at resolve_indirect_refs()\n\nDuring backref walking, at resolve_indirect_refs(), if we get an error\nwe jump to the 'out' label and call ulist_free() on the 'parents' ulist,\nwhich frees all the elements in the ulist - however that does not free\nany inode lists that may be attached to elements, through the 'aux' field\nof a ulist node, so we end up leaking lists if we have any attached to\nthe unodes.\n\nFix this by calling free_leaf_list() instead of ulist_free() when we exit\nfrom resolve_indirect_refs(). The static function free_leaf_list() is\nmoved up for this to be possible and it's slightly simplified by removing\nunnecessary code.","publishedAt":"2025-05-01T14:10:55.581Z","updatedAt":"2026-05-11T19:09:09.294Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"3301958b7c1dae8f0f5ded63aa881e0b71e78464","status":"affected","lessThan":"b1dc9019bb5f89abae85645de1a2dd4830c1f8e9","versionType":"git"},{"version":"3301958b7c1dae8f0f5ded63aa881e0b71e78464","status":"affected","lessThan":"cded2c89774b99b67c98147ae103ea878c92a206","versionType":"git"},{"version":"3301958b7c1dae8f0f5ded63aa881e0b71e78464","status":"affected","lessThan":"2c0329406bb28109c07c6e23e5e3e0fa618a95d7","versionType":"git"},{"version":"3301958b7c1dae8f0f5ded63aa881e0b71e78464","status":"affected","lessThan":"a52e24c7fcc3c5ce3588a14e3663c00868d36623","versionType":"git"},{"version":"3301958b7c1dae8f0f5ded63aa881e0b71e78464","status":"affected","lessThan":"6ba3479f9e96b9ad460c7e77abc26dd16e5dec4f","versionType":"git"},{"version":"3301958b7c1dae8f0f5ded63aa881e0b71e78464","status":"affected","lessThan":"396515db923ad5cbeb179d6b88927870b4cbebb7","versionType":"git"},{"version":"3301958b7c1dae8f0f5ded63aa881e0b71e78464","status":"affected","lessThan":"5614dc3a47e3310fbc77ea3b67eaadd1c6417bf1","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/backref.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.5","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.5","versionType":"semver"},{"version":"4.14.299","status":"unaffected","lessThanOrEqual":"4.14.*","versionType":"semver"},{"version":"4.19.265","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.224","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.154","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.78","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.0.8","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/backref.c"]}],"references":["https://git.kernel.org/stable/c/b1dc9019bb5f89abae85645de1a2dd4830c1f8e9","https://git.kernel.org/stable/c/cded2c89774b99b67c98147ae103ea878c92a206","https://git.kernel.org/stable/c/2c0329406bb28109c07c6e23e5e3e0fa618a95d7","https://git.kernel.org/stable/c/a52e24c7fcc3c5ce3588a14e3663c00868d36623","https://git.kernel.org/stable/c/6ba3479f9e96b9ad460c7e77abc26dd16e5dec4f","https://git.kernel.org/stable/c/396515db923ad5cbeb179d6b88927870b4cbebb7","https://git.kernel.org/stable/c/5614dc3a47e3310fbc77ea3b67eaadd1c6417bf1"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/49xxx/CVE-2022-49914.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-49914","state":"PUBLISHED","datePublished":"2025-05-01T14:10:55.581Z","dateUpdated":"2026-05-11T19:09:09.294Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-05-01T14:05:17.250Z"},"containers":{"cna":{"title":"btrfs: fix inode list leak during backref walking at resolve_indirect_refs()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: fix inode list leak during backref walking at resolve_indirect_refs()\n\nDuring backref walking, at resolve_indirect_refs(), if we get an error\nwe jump to the 'out' label and call ulist_free() on the 'parents' ulist,\nwhich frees all the elements in the ulist - however that does not free\nany inode lists that may be attached to elements, through the 'aux' field\nof a ulist node, so we end up leaking lists if we have any attached to\nthe unodes.\n\nFix this by calling free_leaf_list() instead of ulist_free() when we exit\nfrom resolve_indirect_refs(). The static function free_leaf_list() is\nmoved up for this to be possible and it's slightly simplified by removing\nunnecessary code."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"3301958b7c1dae8f0f5ded63aa881e0b71e78464","status":"affected","lessThan":"b1dc9019bb5f89abae85645de1a2dd4830c1f8e9","versionType":"git"},{"version":"3301958b7c1dae8f0f5ded63aa881e0b71e78464","status":"affected","lessThan":"cded2c89774b99b67c98147ae103ea878c92a206","versionType":"git"},{"version":"3301958b7c1dae8f0f5ded63aa881e0b71e78464","status":"affected","lessThan":"2c0329406bb28109c07c6e23e5e3e0fa618a95d7","versionType":"git"},{"version":"3301958b7c1dae8f0f5ded63aa881e0b71e78464","status":"affected","lessThan":"a52e24c7fcc3c5ce3588a14e3663c00868d36623","versionType":"git"},{"version":"3301958b7c1dae8f0f5ded63aa881e0b71e78464","status":"affected","lessThan":"6ba3479f9e96b9ad460c7e77abc26dd16e5dec4f","versionType":"git"},{"version":"3301958b7c1dae8f0f5ded63aa881e0b71e78464","status":"affected","lessThan":"396515db923ad5cbeb179d6b88927870b4cbebb7","versionType":"git"},{"version":"3301958b7c1dae8f0f5ded63aa881e0b71e78464","status":"affected","lessThan":"5614dc3a47e3310fbc77ea3b67eaadd1c6417bf1","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/backref.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.5","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.5","versionType":"semver"},{"version":"4.14.299","status":"unaffected","lessThanOrEqual":"4.14.*","versionType":"semver"},{"version":"4.19.265","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.224","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.154","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.78","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.0.8","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/backref.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/b1dc9019bb5f89abae85645de1a2dd4830c1f8e9"},{"url":"https://git.kernel.org/stable/c/cded2c89774b99b67c98147ae103ea878c92a206"},{"url":"https://git.kernel.org/stable/c/2c0329406bb28109c07c6e23e5e3e0fa618a95d7"},{"url":"https://git.kernel.org/stable/c/a52e24c7fcc3c5ce3588a14e3663c00868d36623"},{"url":"https://git.kernel.org/stable/c/6ba3479f9e96b9ad460c7e77abc26dd16e5dec4f"},{"url":"https://git.kernel.org/stable/c/396515db923ad5cbeb179d6b88927870b4cbebb7"},{"url":"https://git.kernel.org/stable/c/5614dc3a47e3310fbc77ea3b67eaadd1c6417bf1"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T19:09:09.294Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.5","versionEndExcluding":"4.14.299"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.5","versionEndExcluding":"4.19.265"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.5","versionEndExcluding":"5.4.224"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.5","versionEndExcluding":"5.10.154"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.5","versionEndExcluding":"5.15.78"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.5","versionEndExcluding":"6.0.8"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.5","versionEndExcluding":"6.1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}