CVE-2026-142914: btrfs: fix dangling nodes in tree-mod-log after error in btrfs_tree_mod_log_insert_root()
In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix dangling nodes in tree-mod-log after error in btrfstreemodloginsertroot()
If in btrfstreemodloginsertroot() there is an error in the call to treemodloginsert() (the only possible error is -EEXIST, which means we have a bug or some memory corruption maybe) we free all the nodes in the 'tmlist' array but we don't remove them from the tree-mod-log rbtree, which can result in use-after-free bugs later.
So make sure we remove the nodes from the rbtree before freeing them after an error.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 3.13 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 3.14 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.193 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.163 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.119 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.65 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.6