RDMA/hfi1: fix potential memory leak in setup_base_ctxt()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ e87473bc1b6c2cb08f1b760cfc8cd012822241a6 · < 1750be1e9f18787cf717c24dbc5fa029fc372a22| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
RDMA/hfi1: fix potential memory leak in setup_base_ctxt()
setup_base_ctxt() allocates a memory chunk for uctxt->groups with hfi1_alloc_ctxt_rcv_groups(). When init_user_ctxt() fails, uctxt->groups is not released, which will lead to a memory leak.
We should release the uctxt->groups with hfi1_free_ctxt_rcv_groups() when init_user_ctxt() fails.
From the CVE record · Linux
The Linux kernel's RDMA/hfi1 setup_base_ctxt() can leak memory allocated for uctxt->groups when init_user_ctxt() fails. The input does not specify how an attacker could trigger this failure or whether access or user interaction is required.
Engineers running Linux kernels with the RDMA/hfi1 component should check their installations; affected versions are not specified.