CVE-2026-98090: btrfs: restore active device pointers after failed sprout
In the Linux kernel, the following vulnerability has been resolved:
btrfs: restore active device pointers after failed sprout
btrfsinitnewdevice() switches latestdev and possibly sbdev from the seed device to the new sprout device before creating the first writable chunks.
If chunk creation or the subsequent sprout setup fails, the error path releases the new device without switching those pointers back. btrfsshowdevname() can then dereference the freed latestdev and crash.
Restore the active device pointers to the latest seed device before removing and releasing the failed sprout device.
Affected Software
Event History
Frequently Asked Questions
What conditions are required to trigger the crash?
A Btrfs sprout operation must fail after btrfs_init_new_device() has switched the active device pointers to the new device, such as during first writable chunk creation or subsequent sprout setup. A later call to btrfs_show_devname() can then dereference the released device pointer and crash.
What is the impact of a failed sprout operation on an affected kernel?
The failed sprout device can be released while latest_dev, and potentially s_bdev, still point to it. Subsequent device-name reporting through btrfs_show_devname() may dereference freed memory and crash the kernel.
What does the fix change?
The fix restores the active device pointers to the latest seed device before the failed sprout device is removed and released. This prevents btrfs_show_devname() from using the freed sprout-device pointer.