RDMA/bnxt_re: Validate udata before executing commands
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:
RDMA/bnxt_re: Validate udata before executing commands
The destroy callbacks currently zero the udata output after tearing down driver resources. If the userspace access fails, uverbs preserves the uobject and allows the destroy callback to run again, even though the driver resource has already been freed.
Call ib_no_udata_io() before teardown so udata failures are detected while the resource is still intact, then return success after teardown completes.
As part of this change, move ib_respond_empty_udata() to the start of the create and modify flows. While this is not strictly required for general create flows, as the core layer unwinds uobjects on failure, it is necessary for create AH. In _rdma_create_ah(), the HW object is otherwise leaked.
From the CVE record · Linux
The Linux kernel’s RDMA/bnxt_re driver tears down resources before checking whether userspace data access succeeds. A local userspace caller whose access fails can cause a destroy callback to run again after the resource has been freed; a related create-AH path can leak a hardware object.
Engineers running Linux kernels with the RDMA/bnxt_re driver should check their versions against the vendor advisory; affected versions were not provided.