Vulnerability · Published May 1, 2025 · Assigned by Linux

CVE-2022-49913btrfs: fix inode list leak during backref walking at find_parent_nodes()

Medium 5.5

In plain English

A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 10% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)5.5Medium
Exploit odds (30 days)0.2%top 89.8% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official description

In the Linux kernel, the following vulnerability has been resolved: btrfs: fix inode list leak during backref walking at find_parent_nodes() During backref walking, at find_parent_nodes(), if we are dealing with a data extent and we get an error while resolving the indirect backrefs, at resolve_indirect_refs(), or in the while loop that iterates over the refs in the direct refs rbtree, we end up leaking the inode lists attached to the direct refs we have in the direct refs rbtree that were not yet added to the refs ulist passed as argument to find_parent_nodes(). Since they were not yet added to the refs ulist and prelim_release() does not free the lists, on error the caller can only free the lists attached to the refs that were added to the refs ulist, all the remaining refs get their inode lists never freed, therefore leaking their memory. Fix this by having prelim_release() always free any attached inode list to each ref found in the rbtree, and have find_parent_nodes() set the ref's inode list to NULL once it transfers ownership of the inode list to a ref added to the refs ulist passed to find_parent_nodes().

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12linux6.0.8-1DEBIAN-CVE-2022-49913
Debian:13linux6.0.8-1DEBIAN-CVE-2022-49913
Debian:14linux6.0.8-1DEBIAN-CVE-2022-49913
Ubuntu:22.04:LTSlinux5.15.0-60.66UBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-aws5.15.0-1030.34UBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-azure5.15.0-1033.40UBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-azure-fde5.15.0-1033.40.1UBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-gcp5.15.0-1029.36UBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-gke5.15.0-1027.32UBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-gkeop5.15.0-1015.19UBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-ibm5.15.0-1025.28UBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-intel-iotg5.15.0-1025.30UBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-kvm5.15.0-1028.33UBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-lowlatency5.15.0-60.66UBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-nvidia5.15.0-1017.17UBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-oracle5.15.0-1029.35UBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-raspi5.15.0-1024.26UBUNTU-CVE-2022-49913
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2022-49913
Ubuntu:24.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2022-49913
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2022-49913

Affected products (as reported)

VendorProductVersions
Linux Linux 86d5f994425252d8a40e2184c94a2682ae8ecfbf – before 6a6731a0df8c47ecc703bd7bb73459df767051e086d5f994425252d8a40e2184c94a2682ae8ecfbf – before 61e06128113711df0534c404fb6bb528eb7d233286d5f994425252d8a40e2184c94a2682ae8ecfbf – before 222a3d533027b9492d5b7f5ecdc01a90f57bb5a986d5f994425252d8a40e2184c94a2682ae8ecfbf – before 83ea8c5b54d452a5769e605e3c5c687e8ca06d8986d5f994425252d8a40e2184c94a2682ae8ecfbf – before 92876eec382a0f19f33d09d2c939e9ca49038ae5
Linux Linux 4.14

References