In the Linux kernel, the following vulnerability has been resolved:
nvmet: avoid potential UAF in nvmet_req_complete()
An nvme target ->queue_response() operation implementation may free the request passed as argument. Such implementation potentially could result in a use after free of the request pointer when percpu_ref_put() is called in nvmet_req_complete().
Avoid such problem by using a local variable to save the sq pointer before calling __nvmet_req_complete(), thus avoiding dereferencing the req pointer after that function call.
| Software | From | Fixed in |
|---|---|---|
| linux / linux_kernel | 4.8 | 4.14.311 |
| linux / linux_kernel | 4.15 | 4.19.279 |
| linux / linux_kernel | 4.20 | 5.4.238 |
| linux / linux_kernel | 5.5 | 5.10.176 |
| linux / linux_kernel | 5.11 | 5.15.104 |
| linux / linux_kernel | 5.16 | 6.1.21 |
| linux / linux_kernel | 6.2 | 6.2.8 |
| linux / linux_kernel | 6.3-rc1 | 6.3-rc1.x |
| linux / linux_kernel | 6.3-rc2 | 6.3-rc2.x |