{"id":"CVE-2025-21879","aliases":["CVE-2025-21879"],"related":[],"kind":"vulnerability","state":"published","title":"btrfs: fix use-after-free on inode when scanning root during em shrinking","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: btrfs: se corrige el use-after-free en el inodo al escanear la raíz durante la reducción de em. En btrfs_scan_root(), accedemos a la raíz del inodo (y a fs_info) en una llamada a btrfs_fs_closing() después de haber programado el inodo para una entrada retrasada, lo que puede resultar en un use-after-free en el inodo en caso de que el kthread más limpio realice la entrada antes de que desreferenciamos el inodo en la llamada a btrfs_fs_closing(). Se soluciona esto usando la fs_info ya almacenada en una variable local en lugar de hacer inode-&gt;root-&gt;fs_info.","source":"nvd"}],"published":"2025-03-27T14:57:08.929Z","modified":"2026-08-05T11:55:04.752Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"fef55c4d9c9c22264d2b2ceae1e26922cb6129a5","fixed":"07836bc18f4ae42da4e922244f4685561c18755e","status":"affected"},{"type":"git","introduced":"1020443840569535f6025a855958f07ea3eebf71","fixed":"5e79d26014f9386387575b9ed60d342057cee49b","status":"affected"},{"type":"git","introduced":"1020443840569535f6025a855958f07ea3eebf71","fixed":"59f37036bb7ab3d554c24abc856aabca01126414","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.13","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.13","status":"unaffected"},{"type":"semver","introduced":"6.13.6","lastAffected":"6.13.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.14","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.13","fixed":"6.13.6"},{"status":"affected","version":"6.14"},{"status":"affected","version":"6.14"},{"status":"affected","version":"6.14"},{"status":"affected","version":"6.14"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/07836bc18f4ae42da4e922244f4685561c18755e","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5e79d26014f9386387575b9ed60d342057cee49b","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/59f37036bb7ab3d554c24abc856aabca01126414","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2025-03-28T15:22:49.038Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-21879","url":"https://www.cve.org/CVERecord?id=CVE-2025-21879","licence":"CVE Terms of Use","modified":"2026-08-05T11:55:04.752Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-21879","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-21879","licence":"Public domain","modified":"2026-06-17T08:44:31.037Z"}],"updatedAt":"2026-11-25T22:58:55.611Z","epss":{"score":0.00208,"percentile":0.11602,"date":"2026-12-01T12:00:22.000Z"}}