Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4339028DB56 for ; Tue, 30 Dec 2025 12:10:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767096608; cv=none; b=uuVvAluwB0Svv3obPyr8/8ayiXmRkokg2Eo5T2B8dnB5yAYmFbPwqmjNQcQx4NAirqAfu47h1oqF5RECjJt6DF1Niy4ey+hUuNUR/7GXTTLm0WOv34p3arsAv/6XXs34uLs305T/tu4m7rlkrVspKSWxt+2DxJt5X0rR5Htk7qQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767096608; c=relaxed/simple; bh=KCbynpBhT8rofSf0InNgQMPr3MgKsJEhxgORuf1WFUk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=FvabEdyKBp9Q+ZupKnUtQBoi6EH2/ORVL1eP4fWdQSP0hW6gyMJt/LP+UWUwOXCAwz8L9zP8htFkG1zTZZwdZgT9aKRsdzCAorItI6edxdoYTxj98L7gn2exN1OhxrdSINc8yjG+vWVSRzlYcXi8Rxbknj5DOTlcuetghtH5yZU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=h3thClaJ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="h3thClaJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5D5CFC4CEFB; Tue, 30 Dec 2025 12:10:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767096606; bh=KCbynpBhT8rofSf0InNgQMPr3MgKsJEhxgORuf1WFUk=; h=From:To:Cc:Subject:Date:Reply-To:From; b=h3thClaJl1uaD858GAPG+H4lkWMjBbkV1ueZdKBZBg4AKamLwzRtOaqklvSw83Em1 P8JCgmoaoarSB3sAfVvjhTuCqNf97JEnJtidWG04ZwR2VyxH+GJZ7GViT/4fG6iS5/ +2pBuLZU1kS2BW/CwGoz0NyzWboGOrScj+d7/Bc8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50827: scsi: lpfc: Fix memory leak in lpfc_create_port() Date: Tue, 30 Dec 2025 13:09:31 +0100 Message-ID: <2025123018-CVE-2022-50827-7613@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2573; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=TsRyVR6NbL0NiRI2UiZC3O1SQOEnUphZ2IXPjjba4PE=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnBB96VZ/P+LZ2+mmHp9berX5u33dzqeq585gKVCUzKY t9uR3dP7YhlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJpDcyzHdWtfrhaX9p/jd9 1glaxT7X3G6t42SYK+NbUr1sYqGy+0N3Nw3j9ycOTflzEQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman 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