ublk: use READ_ONCE() to read struct ublksrv_ctrl_cmd
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:
ublk: use READ_ONCE() to read struct ublksrv_ctrl_cmd
struct ublksrv_ctrl_cmd is part of the io_uring_sqe, which may lie in userspace-mapped memory. It's racy to access its fields with normal loads, as userspace may write to them concurrently. Use READ_ONCE() to copy the ublksrv_ctrl_cmd from the io_uring_sqe to the stack. Use the local copy in place of the one in the io_uring_sqe.
From the CVE record · Linux
The Linux kernel's ublk code reads a control command from memory that may be mapped into userspace. Local userspace that can write that memory concurrently can cause the kernel to read its fields inconsistently; the input does not specify a further impact or authentication requirement.
Engineers running Linux kernels with ublk should check their vendor's advisory for affected versions.