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 B1775218587 for ; Wed, 26 Feb 2025 02:15:29 +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=1740536129; cv=none; b=dTolLpyIDGVmBEY5dEScl+byb564nwl1C6g2Kj7wiACAiTcSg58zi4ti0m6xTZ5ipxAYVBG+s2LCPp3sn9zDOk5CLG9A38jxKDSf+d153mWGGWzrz5GIzV3qjkb3QaZzJ6xDrNgMS0irAPMwnyksYQ52d0y74K8GSyksdUUDesg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536129; c=relaxed/simple; bh=08lAzniTRkTj3cN+dZ5EjRuaB2ERVnjwaOQ3v4rcngk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=AA5UvD2KQypM4eNSlDT2s/wPtALqq7JDpSN25yIdu2BbF5YYz7XEVpZjAjg+VEJeMdR8U5TBFWIMoamWfKfxTgMzUk2nCNwyfZFfdcvs8PIyqUdxE3YA2zpyWa0JSCOFTp7QRYKoGe5gBIMj3s3d0r7MQbXZL+DXdiPmmREo1ko= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=HCEHZmwr; 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="HCEHZmwr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2270CC4CEDD; Wed, 26 Feb 2025 02:15:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536129; bh=08lAzniTRkTj3cN+dZ5EjRuaB2ERVnjwaOQ3v4rcngk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=HCEHZmwrfSEwTFs4Ub5X3MLFAEw4IdudFDN/X+Rh18EWhU7kputNA6YHdQFm0cDtu hLLdZy2oBHH8htAiZKyBW33uaA0kckDSV6crLrVnUjp+awr9+n0zh24hZQXR+T8YBv szRNyJkrak21tdhVkAGP389IYTjWuP0IycvdbTUs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49534: scsi: lpfc: Protect memory leak for NPIV ports sending PLOGI_RJT Date: Wed, 26 Feb 2025 03:13:28 +0100 Message-ID: <2025022613-CVE-2022-49534-ad11@gregkh> X-Mailer: git-send-email 2.48.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2085; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=08lAzniTRkTj3cN+dZ5EjRuaB2ERVnjwaOQ3v4rcngk=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7KlifP7xxcUFyVGaiV/X2s8vnndfzUjl6cLvYgZ7DZ 4zF2KdWd8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEbi5jmF/uuWhau+qtT9t9 HNwTc3xupdh0yDAsWFcVKn99Zc4jq1/Stc4prdn72zRkAQ== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: scsi: lpfc: Protect memory leak for NPIV ports sending PLOGI_RJT There is a potential memory leak in lpfc_ignore_els_cmpl() and lpfc_els_rsp_reject() that was allocated from NPIV PLOGI_RJT (lpfc_rcv_plogi()'s login_mbox). Check if cmdiocb->context_un.mbox was allocated in lpfc_ignore_els_cmpl(), and then free it back to phba->mbox_mem_pool along with mbox->ctx_buf for service parameters. For lpfc_els_rsp_reject() failure, free both the ctx_buf for service parameters and the login_mbox. The Linux kernel CVE team has assigned CVE-2022-49534 to this issue. Affected and fixed versions =========================== Fixed in 5.18.3 with commit c00df0f34a6d5e14da379f96ea67e501ce67b002 Fixed in 5.19 with commit 672d1cb40551ea9c95efad43ab6d45e4ab4e015f 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-49534 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_nportdisc.c 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/c00df0f34a6d5e14da379f96ea67e501ce67b002 https://git.kernel.org/stable/c/672d1cb40551ea9c95efad43ab6d45e4ab4e015f