fs/aio: Check IOCB_AIO_RW before the struct aio_kiocb conversion
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ e7e23fc5d5fe422827c9a43ecb579448f73876c7 · < c01ed748847fe8b810d86efc229b9e6c7fafa01e| No fix yet |
| Linux Linux |
| No fix yet |
In the Linux kernel, the following vulnerability has been resolved:
fs/aio: Check IOCB_AIO_RW before the struct aio_kiocb conversion
The first kiocb_set_cancel_fn() argument may point at a struct kiocb that is not embedded inside struct aio_kiocb. With the current code, depending on the compiler, the req->ki_ctx read happens either before the IOCB_AIO_RW test or after that test. Move the req->ki_ctx read such that it is guaranteed that the IOCB_AIO_RW test happens first.
From the CVE record · Linux
The Linux kernel’s fs/aio code may read a field from a structure that is not an aio_kiocb before checking IOCB_AIO_RW. The input does not specify how an attacker could trigger this issue or whether access, authentication, or user interaction is required.
Engineers running the Linux kernel should check their deployments; affected versions are not specified.