{"id":"CVE-2026-89645","summary":"btrfs: drop recovered reloc root refs on recovery failure","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: drop recovered reloc root refs on recovery failure\n\nDuring relocation recovery, each fs root gets a reference to its relocation\nroot. If loading or adding a later root fails, or if the first transaction\ncommit fails, btrfs_recover_relocation() jumps to out_unset before\nmerge_reloc_roots() and clean_dirty_subvols().\n\nput_reloc_control() drops the list-owned relocation root references, but it\ndoes not clear fs_root-\u003ereloc_root or drop the references owned by those\npointers. Mount cleanup only drops them when BTRFS_FS_ERROR is set, so an\nerror such as -ENOMEM while processing a later root can leave references\nbehind.\n\nKeep temporary references to the fs roots associated during recovery. On\nfailure, clear their reloc_root pointers and drop the corresponding\nreferences. Once the first transaction commit succeeds, drop only the\ntemporary fs root references and let the normal merge and cleanup paths\nhandle the relocation roots.\n\nFault injection on a pending-relocation image confirmed the cleanup gap.\nWith an injected first-commit failure, 25 fs roots had reloc_root set with\nfs_error=0. With this fix, the same failure path drops that count to 0\nbefore mount fails.","modified":"2026-09-13T03:46:39.201636552Z","published":"2026-09-11T19:45:37.016Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/89xxx/CVE-2026-89645.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/2256d6dc5b88841a8a8b4fd9a9f04730705fb6fd"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4d43107e807bcd92621106b07f5011411c6341a8"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6d8ba4572922e336f0b59a80751b018e1e135164"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8a64baeb5bbb706b83d2235c1e39f5b77183817f"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/89xxx/CVE-2026-89645.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-89645"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"f44deb7442edf42abee6be25fca7e3e86061b4c9"},{"fixed":"2256d6dc5b88841a8a8b4fd9a9f04730705fb6fd"},{"fixed":"8a64baeb5bbb706b83d2235c1e39f5b77183817f"},{"fixed":"4d43107e807bcd92621106b07f5011411c6341a8"},{"fixed":"6d8ba4572922e336f0b59a80751b018e1e135164"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-89645.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.7.0"},{"fixed":"6.12.109"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.50"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.2.4"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-89645.json"}}],"schema_version":"1.9.0"}