[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025123018-CVE-2022-50827-7613@gregkh>
Date: Tue, 30 Dec 2025 13:09:31 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...nel.org>
Subject: CVE-2022-50827: scsi: lpfc: Fix memory leak in lpfc_create_port()
From: Greg Kroah-Hartman <gregkh@...nel.org>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
scsi: lpfc: Fix memory leak in lpfc_create_port()
Commit 5e633302ace1 ("scsi: lpfc: vmid: Add support for VMID in mailbox
command") introduced allocations for the VMID resources in
lpfc_create_port() after the call to scsi_host_alloc(). Upon failure on the
VMID allocations, the new code would branch to the 'out' label, which
returns NULL without unwinding anything, thus skipping the call to
scsi_host_put().
Fix the problem by creating a separate label 'out_free_vmid' to unwind the
VMID resources and make the 'out_put_shost' label call only
scsi_host_put(), as was done before the introduction of allocations for
VMID.
The Linux kernel CVE team has assigned CVE-2022-50827 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.14 with commit 5e633302ace1f61f8ea5a3ce21e19a4d79126cca and fixed in 5.15.76 with commit 9749595feb33a1a2b848800192224ffeed5346b4
Issue introduced in 5.14 with commit 5e633302ace1f61f8ea5a3ce21e19a4d79126cca and fixed in 6.0.6 with commit 5ea1f195f51c2bb5915ccfb2b2885ca81ce9262b
Issue introduced in 5.14 with commit 5e633302ace1f61f8ea5a3ce21e19a4d79126cca and fixed in 6.1 with commit dc8e483f684a24cc06e1d5fa958b54db58855093
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-50827
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_init.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/9749595feb33a1a2b848800192224ffeed5346b4
https://git.kernel.org/stable/c/5ea1f195f51c2bb5915ccfb2b2885ca81ce9262b
https://git.kernel.org/stable/c/dc8e483f684a24cc06e1d5fa958b54db58855093
Powered by blists - more mailing lists