CVE-2022-50027: scsi: lpfc: Fix possible memory leak when failing to issue CMF WQE
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
scsi: lpfc: Fix possible memory leak when failing to issue CMF WQE
There is no corresponding free routine if lpfc_sli4_issue_wqe fails to issue the CMF WQE in lpfc_issue_cmf_sync_wqe.
If ret_val is non-zero, then free the iocbq request structure.
The Linux kernel CVE team has assigned CVE-2022-50027 to this issue.
Affected and fixed versions
===========================
Fixed in 5.15.63 with commit 9c8e2e607270a368834a0ef72aa82d970f89c596 Fixed in 5.19.4 with commit 4eb7a1beff03836d3df271cd23b790884e3facb9 Fixed in 6.0 with commit 2f67dc7970bce3529edce93a0a14234d88b3fcd5
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-2022-50027
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:
drivers/scsi/lpfc/lpfc_sli.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/9c8e2e607270a368834a0ef72aa82d970f89c596 https://git.kernel.org/stable/c/4eb7a1beff03836d3df271cd23b790884e3facb9 https://git.kernel.org/stable/c/2f67dc7970bce3529edce93a0a14234d88b3fcd5