CVE-2022-49521: scsi: lpfc: Fix resource leak in lpfc_sli4_send_seq_to_ulp()
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
scsi: lpfc: Fix resource leak in lpfc_sli4_send_seq_to_ulp()
If no handler is found in lpfc_complete_unsol_iocb() to match the rctl of a received frame, the frame is dropped and resources are leaked.
Fix by returning resources when discarding an unhandled frame type. Update lpfc_fc_frame_check() handling of NOP basic link service.
The Linux kernel CVE team has assigned CVE-2022-49521 to this issue.
Affected and fixed versions
===========================
Fixed in 5.10.121 with commit fa1b509d41c5433672f72c0615cf4aefa0611c99 Fixed in 5.15.46 with commit 40cf4ea4d2d497f7732c87d350ba5c3f5e8a43a1 Fixed in 5.17.14 with commit 08709769ff2fb6c5ffedcda3742700d8ea1618a8 Fixed in 5.18.3 with commit 7860d8f8082605b57596aa82d3d438c1fdad9a9e Fixed in 5.19 with commit 646db1a560f44236b7278b822ca99a1d3b6ea72c
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-49521
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/fa1b509d41c5433672f72c0615cf4aefa0611c99 https://git.kernel.org/stable/c/40cf4ea4d2d497f7732c87d350ba5c3f5e8a43a1 https://git.kernel.org/stable/c/08709769ff2fb6c5ffedcda3742700d8ea1618a8 https://git.kernel.org/stable/c/7860d8f8082605b57596aa82d3d438c1fdad9a9e https://git.kernel.org/stable/c/646db1a560f44236b7278b822ca99a1d3b6ea72c