CVE-2024-53077: rpcrdma: Always release the rpcrdma_device's xa_array
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
rpcrdma: Always release the rpcrdma_device's xa_array
Dai pointed out that the xa_init_flags() in rpcrdma_add_one() needs to have a matching xa_destroy() in rpcrdma_remove_one() to release underlying memory that the xarray might have accrued during operation.
The Linux kernel CVE team has assigned CVE-2024-53077 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.11 with commit 7e86845a0346 and fixed in 6.11.7 with commit 36b7f5a4f300 Issue introduced in 6.11 with commit 7e86845a0346 and fixed in 6.12 with commit 63a81588cd20
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2024-53077
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
net/sunrpc/xprtrdma/ib_client.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/36b7f5a4f300d038270324640ff7c1399245159d https://git.kernel.org/stable/c/63a81588cd2025e75fbaf30b65930b76825c456f