{"id":"CVE-2025-21879","published":"2025-03-27T14:57:08Z","modified":"2026-08-05T11:55:04Z","title":"btrfs: fix use-after-free on inode when scanning root during em shrinking","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: fix use-after-free on inode when scanning root during em shrinking\n\nAt btrfs_scan_root() we are accessing the inode's root (and fs_info) in a\ncall to btrfs_fs_closing() after we have scheduled the inode for a delayed\niput, and that can result in a use-after-free on the inode in case the\ncleaner kthread does the iput before we dereference the inode in the call\nto btrfs_fs_closing().\n\nFix this by using the fs_info stored already in a local variable instead\nof doing inode->root->fs_info.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00208,"percentile":0.1117,"provenance":"source"},"cwes":[{"id":"CWE-416","name":"Use After Free"}],"references":[{"url":"https://git.kernel.org/stable/c/07836bc18f4ae42da4e922244f4685561c18755e","tags":[]},{"url":"https://git.kernel.org/stable/c/5e79d26014f9386387575b9ed60d342057cee49b","tags":[]},{"url":"https://git.kernel.org/stable/c/59f37036bb7ab3d554c24abc856aabca01126414","tags":[]}],"priority":{"score":7.7,"factors":[{"name":"EPSS percentile","points":2.23},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= fef55c4d9c9c22264d2b2ceae1e26922cb6129a5, < 07836bc18f4ae42da4e922244f4685561c18755e",">= 1020443840569535f6025a855958f07ea3eebf71, < 5e79d26014f9386387575b9ed60d342057cee49b",">= 1020443840569535f6025a855958f07ea3eebf71, < 59f37036bb7ab3d554c24abc856aabca01126414"]},{"vendor":"Linux","product":"Linux","versions":["6.13"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2025-03-28T15:22:49.038837Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2025-8487","exploited":false,"provenance":"source"}}