btrfs: restore active device pointers after failed sprout
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ b7cb29e666fe79dda5dbe5f57fb7c92413bf161c · < b79b4b29003690acfade8241998fc0104ef9c84c| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
btrfs: restore active device pointers after failed sprout
btrfs_init_new_device() switches latest_dev and possibly s_bdev 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. btrfs_show_devname() can then dereference the freed latest_dev and crash.
Restore the active device pointers to the latest seed device before removing and releasing the failed sprout device.
From the CVE record · Linux
In the Linux kernel, a failed btrfs sprout can leave an active device pointer referring to a released device. A subsequent device-name lookup can dereference that pointer and crash; the input does not specify an attacker path or whether access or user interaction is required.
Engineers running Linux kernels with btrfs should check their versions; affected versions are not specified.