{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2025-21879","id":"CVE-2025-21879","title":"btrfs: fix use-after-free on inode when scanning root during em shrinking","description":"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","descriptionLong":"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.","published":"2025-03-27T14:57:08.929Z","updated":"2026-10-28T02:30:50.616930874Z","reserved":"2024-12-29T08:45:45.782Z","status":"Modified","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"Linux"},"metrics":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"Linux"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"CISA-ADP"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"}],"rating":"high","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"fef55c4d9c9c22264d2b2ceae1e26922cb6129a5","lessThan":"07836bc18f4ae42da4e922244f4685561c18755e","status":"affected","versionType":"git"},{"version":"1020443840569535f6025a855958f07ea3eebf71","lessThan":"5e79d26014f9386387575b9ed60d342057cee49b","status":"affected","versionType":"git"},{"version":"1020443840569535f6025a855958f07ea3eebf71","lessThan":"59f37036bb7ab3d554c24abc856aabca01126414","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.13","status":"affected"},{"version":"0","lessThan":"6.13","status":"unaffected","versionType":"semver"},{"version":"6.13.6","lessThanOrEqual":"6.13.*","status":"unaffected","versionType":"semver"},{"version":"6.14","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-416"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/07836bc18f4ae42da4e922244f4685561c18755e","tags":["web"]},{"url":"https://git.kernel.org/stable/c/5e79d26014f9386387575b9ed60d342057cee49b","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/59f37036bb7ab3d554c24abc856aabca01126414","tags":["Patch","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21879.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-21879","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total"},"epss":0.00208,"epssPercentile":0.11075,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2025-21879","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-21879","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2025-21879","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2025-21879","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}