btrfs: dev-replace: properly validate device names
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ e93c89c1aaaaaec3487c4c18dd02360371790722 · < b1690ced4d2d8b28868811fb81cd33eee5aefee1| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
btrfs: dev-replace: properly validate device names
There's a syzbot report that device name buffers passed to device replace are not properly checked for string termination which could lead to a read out of bounds in getname_kernel().
Add a helper that validates both source and target device name buffers. For devid as the source initialize the buffer to empty string in case something tries to read it later.
This was originally analyzed and fixed in a different way by Edward Adam Davis (see links).
From the CVE record · Linux
The Linux kernel’s btrfs device-replacement code did not properly validate device-name buffers for string termination. An improperly terminated name could cause an out-of-bounds read in getname_kernel(). The input does not specify the access or authentication needed to trigger it.
Engineers running the Linux kernel with btrfs should check their kernel versions; affected versions are not specified in the input.