Linux kernel double free in Btrfs io_uring encoded reads
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.18.577.2.117.3In the Linux kernel, the following vulnerability has been resolved:
btrfs: always return -EIOCBQUEUED after btrfs_uring_read_extent_endio
If all bios finish before btrfs_encoded_read_regular_fill_pages() returns, it calls btrfs_uring_read_extent_endio() and previously returned the I/O status. A negative errno then made btrfs_uring_read_extent() unlock and free while btrfs_uring_read_finished() did the same again.
Return -EIOCBQUEUED so only the deferred path cleans up.
From the CVE record · Linux
The Linux kernel’s btrfs encoded-read path could unlock and free the same resources twice. This happens when all I/O operations finish before btrfs_encoded_read_regular_fill_pages() returns and a negative I/O status is returned. The input does not specify an attacker scenario or access requirements.
Engineers running Linux kernels with btrfs should check whether their kernel includes the fix; affected versions are not specified.