block: Fix WARNING in _copy_from_iter
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:
block: Fix WARNING in _copy_from_iter
Syzkaller reports a warning in _copy_from_iter because an iov_iter is supposedly used in the wrong direction. The reason is that syzcaller managed to generate a request with a transfer direction of SG_DXFER_TO_FROM_DEV. This instructs the kernel to copy user buffers into the kernel, read into the copied buffers and then copy the data back to user space.
Thus the iovec is used in both directions.
Detect this situation in the block layer and construct a new iterator with the correct direction for the copy-in.
From the CVE record · Linux
The Linux kernel block layer can use an iovec in the wrong direction for a request with the SG_DXFER_TO_FROM_DEV transfer direction. A locally generated request of this kind can trigger a warning in _copy_from_iter during the copy from user space.
Teams running the Linux kernel should check whether their kernel includes the block-layer fix; affected versions were not specified.