Linux kernel memory leak in Btrfs io_uring encoded I/O
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 |
|
|
In the Linux kernel, the following vulnerability has been resolved:
btrfs: don't stash io_uring encoded data across -EAGAIN
Returning -EAGAIN while leaving btrfs_uring_encoded_data in the cmd PDU leaks if the request is cancelled or the ring exits before reissue. io_uring does not free driver PDU allocations on cleanup.
Write: io_queue_sqe() always issues with IO_URING_F_NONBLOCK first, so return -EAGAIN before allocating and free data on every exit.
Read: free on nowait -EAGAIN too; only -EIOCBQUEUED keeps the allocation for btrfs_uring_read_finished().
From the CVE record · Linux
The Linux kernel’s btrfs encoded I/O handling can leave allocated data attached to an io_uring request after returning -EAGAIN. The allocation can leak if the request is cancelled or the ring exits before reissue. This requires a local io_uring request; the input does not specify authentication requirements.
Engineers running Linux kernels with btrfs encoded I/O should check their kernel version; affected versions are not specified.