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 1D6AF1F7580 for ; Thu, 18 Sep 2025 13:36:02 +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=1758202562; cv=none; b=C8cI/6FkItFQcqxi5pgNlEoNJTIQZzoOunJd2LxIe20p3QCzyWRfpHCNPzvaHRrGFSLGBJcWRoBXA8zlSxyzHtmW5H5p4H0P1AAFe0B/dAxzf2kCNqRajqCN/3rhty+mYlEGLphumTAsJCU5adpA1nx0d9UiXqNjE8kXMJb1xEw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758202562; c=relaxed/simple; bh=2CrPqXnhKHL+Qwwk8cHBXMBjgxHnJFtzJWRncxQEYEg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ZlmEq2nnerL93sp6r7SRqLqytZF8kywGfJGQRm3hJpmCxibBSyLvX0t9CppNFBJqDEeK5stm9DQh+QB0DUt6YMN7trkF2/4FrQAD6TWZRhDk+qTyDwe+NwZJOLb15cmSSmRA613lmBLHF1VMsWmTqCsl6nlzQB0DWqWBumc4Qw8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=fTQAGFrO; 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="fTQAGFrO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92061C4CEE7; Thu, 18 Sep 2025 13:36:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758202562; bh=2CrPqXnhKHL+Qwwk8cHBXMBjgxHnJFtzJWRncxQEYEg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=fTQAGFrOlYw7jwDho3T0Xkr91AHYor/YXL2jP+GzoxmJmoTg0eLEDKA4DphuEzi9T vnnUIC5kwBku8gE+aJ0cUl/b43glHZi7uGRCzl22J7gVZqhbNzlJREzcpWT40AXZmB O/FBHr22SPpgnIphbUbgGMq9SngtvpvltaLoLFeA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53387: scsi: ufs: core: Fix device management cmd timeout flow Date: Thu, 18 Sep 2025 15:34:32 +0200 Message-ID: <2025091857-CVE-2023-53387-1fb7@gregkh> X-Mailer: git-send-email 2.51.0 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=2775; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=W2qK+6+1OnP7O7iMH2vWPdH7E4GO4ijA/uRCjwoHyK0=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlnuFxb9j5+vuPgqoxrrAxFtr0q/VlfqiJnthxbmlm2e OmD+lWvOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiu3YxLJh+ReOLi4ybyuoA Wdn9q35V+gklBzMsmNxQWd67rmn5ivXt6jXnvkwIZVjIDQA= 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: ufs: core: Fix device management cmd timeout flow In the UFS error handling flow, the host will send a device management cmd (NOP OUT) to the device for link recovery. If this cmd times out and clearing the doorbell fails, ufshcd_wait_for_dev_cmd() will do nothing and return. hba->dev_cmd.complete struct is not set to NULL. When this happens, if cmd has been completed by device, then we will call complete() in __ufshcd_transfer_req_compl(). Because the complete struct is allocated on the stack, the following crash will occur: ipanic_die+0x24/0x38 [mrdump] die+0x344/0x748 arm64_notify_die+0x44/0x104 do_debug_exception+0x104/0x1e0 el1_dbg+0x38/0x54 el1_sync_handler+0x40/0x88 el1_sync+0x8c/0x140 queued_spin_lock_slowpath+0x2e4/0x3c0 __ufshcd_transfer_req_compl+0x3b0/0x1164 ufshcd_trc_handler+0x15c/0x308 ufshcd_host_reset_and_restore+0x54/0x260 ufshcd_reset_and_restore+0x28c/0x57c ufshcd_err_handler+0xeb8/0x1b6c process_one_work+0x288/0x964 worker_thread+0x4bc/0xc7c kthread+0x15c/0x264 ret_from_fork+0x10/0x30 The Linux kernel CVE team has assigned CVE-2023-53387 to this issue. Affected and fixed versions =========================== Fixed in 6.1.16 with commit cf45493432704786a0f8294c7723ad4eeb5fff24 Fixed in 6.2.3 with commit 3ffd2cd644e0f1eea01339831bac4b1054e8817c Fixed in 6.3 with commit 36822124f9de200cedc2f42516301b50d386a6cd 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-2023-53387 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/ufs/core/ufshcd.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/cf45493432704786a0f8294c7723ad4eeb5fff24 https://git.kernel.org/stable/c/3ffd2cd644e0f1eea01339831bac4b1054e8817c https://git.kernel.org/stable/c/36822124f9de200cedc2f42516301b50d386a6cd