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 A4767219EA0 for ; Wed, 26 Feb 2025 02:15:35 +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=1740536135; cv=none; b=D0C2N5NUU1V81hK/TbToQ+6vO5C+EJAwqHTlK070jfrHkXyx3RonUtpTwZblJL4rqPzlxR9/psrQAiok+OYI18tVb8FJbx333wJHGvP8oBtH8sCms1Z1PlbTCYILLrjVrOSLsWrH1ikCbwWxYogDYqMsP0qS0MgH3TnD5OJkefM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536135; c=relaxed/simple; bh=UE9x9cPXP2jHxCHYx92xZjRDpXYNCbMKzTTCHmNIV2o=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ezsSMPimp0nh0uVH8XiSRXpvBExyIQu8HmJ9eCVqt9D1s28G+emBlTGTt/pZDI6DzuLBOnG+nqa487DJtrVcjqPF+cm64l2k8IK2q5JynV9tSVU+Kx40odw08jq5x2W0ikQG/8PUP1fb9I1NDR/w9c6j0KJaW+rsCdaHHKTDHfk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=GzTKwjJB; 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="GzTKwjJB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 74A07C4CEE8; Wed, 26 Feb 2025 02:15:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536135; bh=UE9x9cPXP2jHxCHYx92xZjRDpXYNCbMKzTTCHmNIV2o=; h=From:To:Cc:Subject:Date:Reply-to:From; b=GzTKwjJB8m0R+09el4qBraRIp5E56+pLsWpEGbZeKSsX30/ONEKli5Y/TdZIB0zSS QQklPtLNPCvm4zJj+OBI8WjVVx9RAvQCWZ0Z03NfLa3NUReC3yMlcdL1GyfurZwWcU pqz8mzEhcarOCQTZfYqRpzeHaXaIQBhs0rIlOgwg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49542: scsi: lpfc: Move cfg_log_verbose check before calling lpfc_dmp_dbg() Date: Wed, 26 Feb 2025 03:13:36 +0100 Message-ID: <2025022614-CVE-2022-49542-8f78@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=2752; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=UE9x9cPXP2jHxCHYx92xZjRDpXYNCbMKzTTCHmNIV2o=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7KtiCyrWX3rjD/s99ynaW+xqiJXy3339X3ibH2zh7b UbUr8tTOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAi6woZ5gqoHnAr+jDlbuei u7eXXP194ulj9oMM80NdyqZMmbM1wW3pbM+JVcEmZlvdCwE= 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: Move cfg_log_verbose check before calling lpfc_dmp_dbg() In an attempt to log message 0126 with LOG_TRACE_EVENT, the following hard lockup call trace hangs the system. Call Trace: _raw_spin_lock_irqsave+0x32/0x40 lpfc_dmp_dbg.part.32+0x28/0x220 [lpfc] lpfc_cmpl_els_fdisc+0x145/0x460 [lpfc] lpfc_sli_cancel_jobs+0x92/0xd0 [lpfc] lpfc_els_flush_cmd+0x43c/0x670 [lpfc] lpfc_els_flush_all_cmd+0x37/0x60 [lpfc] lpfc_sli4_async_event_proc+0x956/0x1720 [lpfc] lpfc_do_work+0x1485/0x1d70 [lpfc] kthread+0x112/0x130 ret_from_fork+0x1f/0x40 Kernel panic - not syncing: Hard LOCKUP The same CPU tries to claim the phba->port_list_lock twice. Move the cfg_log_verbose checks as part of the lpfc_printf_vlog() and lpfc_printf_log() macros before calling lpfc_dmp_dbg(). There is no need to take the phba->port_list_lock within lpfc_dmp_dbg(). The Linux kernel CVE team has assigned CVE-2022-49542 to this issue. Affected and fixed versions =========================== Fixed in 5.15.46 with commit 271725e4028559ae7974d762a8467dc9de412f2e Fixed in 5.17.14 with commit cc6501afccec55b8b6c90584cbf71f1fefa77d1e Fixed in 5.18.3 with commit 09c772557a4fd9490fed1bfb133268313ea22213 Fixed in 5.19 with commit e294647b1aed4247fe52851f3a3b2b19ae906228 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-49542 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 drivers/scsi/lpfc/lpfc_logmsg.h 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/271725e4028559ae7974d762a8467dc9de412f2e https://git.kernel.org/stable/c/cc6501afccec55b8b6c90584cbf71f1fefa77d1e https://git.kernel.org/stable/c/09c772557a4fd9490fed1bfb133268313ea22213 https://git.kernel.org/stable/c/e294647b1aed4247fe52851f3a3b2b19ae906228