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 881E61A5BB6 for ; Wed, 26 Feb 2025 01:58:55 +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=1740535135; cv=none; b=P1qR+M/9oYjS1P+ASbdQqmSF3AKro9S97LGQJAgOFVBy//E9i91stEpjz2BlemoK3nXul18i6VLHn+YJ38KTS+APeS4Uc1C4nUGY+nQeiaJMcRSn3SxAMDSAyA/eM58ATk2JuOEk11IRJPj2LhMLyLU4L00bIkjA3H0enuvHW5E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740535135; c=relaxed/simple; bh=uiGzETKWlrr6kqgOZVVUutdGHyqPvcJ4m6fYxnnCWw4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=YSXhmagP/8eT21ouFzX7MBpCz0Hqsgz4TWV1hllgZ+tDoAupxIc4d1UgNY/Bpx3QFmbYjj16T5CxHa7UJnsIRXsBPFSTyMxFfLwG8jnrbK/OA6xFOunnq/SHvxwceo42bNJhTy/HEDd6YzM72JTdnJUfIl7SfpNjScYUsWeBkiw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tUV88+nG; 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="tUV88+nG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5CAA4C4CEDD; Wed, 26 Feb 2025 01:58:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740535135; bh=uiGzETKWlrr6kqgOZVVUutdGHyqPvcJ4m6fYxnnCWw4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=tUV88+nGkKDXv/5tk5rxq6rN3LRLirNz5IXx3CKeniqdcBfJMBUtk4XIO0OGmyyGw KkVWdRWwfXNGdn2v4f9G4YTPcQIUbrWnzSZ979H3WLiji3g+9izFVeWq8pxQwFGBh2 BGLY6ZlJlYprFVY2NpxfhvX2OQCSvaSMjjMYq53Y= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49156: scsi: qla2xxx: Fix scheduling while atomic Date: Wed, 26 Feb 2025 02:56:01 +0100 Message-ID: <2025022610-CVE-2022-49156-a5c9@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=3691; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=uiGzETKWlrr6kqgOZVVUutdGHyqPvcJ4m6fYxnnCWw4=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7Spwy9/FFTOuvdcibf7d2yUxFN8M79zW99d0fpJ2d3 My06oBVRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzkeC7DgiNLvxa/PLWUa/7L jZ2p5exGTEsF9jMsWH2He0Vn68LLJwWVVT0bj4W9yozcAwA= 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: qla2xxx: Fix scheduling while atomic The driver makes a call into midlayer (fc_remote_port_delete) which can put the thread to sleep. The thread that originates the call is in interrupt context. The combination of the two trigger a crash. Schedule the call in non-interrupt context where it is more safe. kernel: BUG: scheduling while atomic: swapper/7/0/0x00010000 kernel: Call Trace: kernel: kernel: dump_stack+0x66/0x81 kernel: __schedule_bug.cold.90+0x5/0x1d kernel: __schedule+0x7af/0x960 kernel: schedule+0x28/0x80 kernel: schedule_timeout+0x26d/0x3b0 kernel: wait_for_completion+0xb4/0x140 kernel: ? wake_up_q+0x70/0x70 kernel: __wait_rcu_gp+0x12c/0x160 kernel: ? sdev_evt_alloc+0xc0/0x180 [scsi_mod] kernel: synchronize_sched+0x6c/0x80 kernel: ? call_rcu_bh+0x20/0x20 kernel: ? __bpf_trace_rcu_invoke_callback+0x10/0x10 kernel: sdev_evt_alloc+0xfd/0x180 [scsi_mod] kernel: starget_for_each_device+0x85/0xb0 [scsi_mod] kernel: ? scsi_init_io+0x360/0x3d0 [scsi_mod] kernel: scsi_init_io+0x388/0x3d0 [scsi_mod] kernel: device_for_each_child+0x54/0x90 kernel: fc_remote_port_delete+0x70/0xe0 [scsi_transport_fc] kernel: qla2x00_schedule_rport_del+0x62/0xf0 [qla2xxx] kernel: qla2x00_mark_device_lost+0x9c/0xd0 [qla2xxx] kernel: qla24xx_handle_plogi_done_event+0x55f/0x570 [qla2xxx] kernel: qla2x00_async_login_sp_done+0xd2/0x100 [qla2xxx] kernel: qla24xx_logio_entry+0x13a/0x3c0 [qla2xxx] kernel: qla24xx_process_response_queue+0x306/0x400 [qla2xxx] kernel: qla24xx_msix_rsp_q+0x3f/0xb0 [qla2xxx] kernel: __handle_irq_event_percpu+0x40/0x180 kernel: handle_irq_event_percpu+0x30/0x80 kernel: handle_irq_event+0x36/0x60 The Linux kernel CVE team has assigned CVE-2022-49156 to this issue. Affected and fixed versions =========================== Fixed in 5.10.110 with commit 7fef50214dd04427233a2e66cd624d468e67aecb Fixed in 5.15.33 with commit 826a9d4a00d1424afa961504aec6298ee92d5053 Fixed in 5.16.19 with commit 78225d6a2a4ffdb2250ce2b7691a9e68a3f86912 Fixed in 5.17.2 with commit 78612f2fe8e26637476d756a44f0f05cca0d97de Fixed in 5.18 with commit afd438ff874ca40b74321b3fa19bd61adfd7ca0c 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-49156 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/qla2xxx/qla_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/7fef50214dd04427233a2e66cd624d468e67aecb https://git.kernel.org/stable/c/826a9d4a00d1424afa961504aec6298ee92d5053 https://git.kernel.org/stable/c/78225d6a2a4ffdb2250ce2b7691a9e68a3f86912 https://git.kernel.org/stable/c/78612f2fe8e26637476d756a44f0f05cca0d97de https://git.kernel.org/stable/c/afd438ff874ca40b74321b3fa19bd61adfd7ca0c