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 171D11534EC for ; Mon, 8 Dec 2025 01:20:20 +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=1765156820; cv=none; b=qevh8ckdxPreEyNkvszwxjLo3Pj9GyQfcu/v8DnCmtB9cF3EPSY5uBcpE4RtxSCy8g7TLeSeXsuN0Pw/wTXUwwgEZAP2ohtT0wWSq1aquPgH13EVex7adA+WAuboDig0u2W1XZ796V4MobVAsX0xzMgFKZTscdDmh883wUo19GE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765156820; c=relaxed/simple; bh=z5kR/eTmz/Ciuc/a76pf6YNRiJg8vqehloosdF0u/Z0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=SG82+Ezuo+ZBcrQUOyq1COTKyNpsZNo7Eh9dDAHyGwGDw9K3qlusXgElDsQ8dDPojGoirU8Pr/Qi1seBt7B+ePSVS2GDNmOfloThIqVkFT3ZeWc62E/Z5YQEkpL8ToXqIhSoDc5vibzNZO3IhyjkS0lyk8vyhd2YqA53DpgjTyw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Wt2ePveG; 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="Wt2ePveG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8C44C4CEFB; Mon, 8 Dec 2025 01:20:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765156820; bh=z5kR/eTmz/Ciuc/a76pf6YNRiJg8vqehloosdF0u/Z0=; h=From:To:Cc:Subject:Date:Reply-To:From; b=Wt2ePveGXECxesFPWwTpEMEjA29Us5iTeLLsYX4ZU6A5Ogp70TdGlyvnvabM0kKfV UULCLN4qzB8YMyb7ivOmlZOd7Urv2NyJ1HZb47vbj9zEy+GMvGZI8LAiuK2W6QZHLf lr0ujwa/u+8h8bmtOusuH1TYRKlgJAg+F8Evr/r4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53760: scsi: ufs: core: mcq: Fix &hwq->cq_lock deadlock issue Date: Mon, 8 Dec 2025 10:19:59 +0900 Message-ID: <2025120844-CVE-2023-53760-8e04@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=3863; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=j/aHFO1TxxZJ+1EKD/4yAvyyIQ4fYFd7GyWIgqX3y3c=; b=owGbwMvMwCRo6H6F97bub03G02pJDJlm6hu8pKPZghfvmJLKEtcku3fumws7/ontF1/K1qnS2 Md8cu+ljlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhIwgWGuTLX/C1Ckplr8m2b qhv/l3h/aArmYZjvse3W95pr602+7HdpmnNH9lPfkth7AA== 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: mcq: Fix &hwq->cq_lock deadlock issue When ufshcd_err_handler() is executed, CQ event interrupt can enter waiting for the same lock. This can happen in ufshcd_handle_mcq_cq_events() and also in ufs_mtk_mcq_intr(). The following warning message will be generated when &hwq->cq_lock is used in IRQ context with IRQ enabled. Use ufshcd_mcq_poll_cqe_lock() with spin_lock_irqsave instead of spin_lock to resolve the deadlock issue. [name:lockdep&]WARNING: inconsistent lock state [name:lockdep&]-------------------------------- [name:lockdep&]inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage. [name:lockdep&]kworker/u16:4/260 [HC0[0]:SC0[0]:HE1:SE1] takes: ffffff8028444600 (&hwq->cq_lock){?.-.}-{2:2}, at: ufshcd_mcq_poll_cqe_lock+0x30/0xe0 [name:lockdep&]{IN-HARDIRQ-W} state was registered at: lock_acquire+0x17c/0x33c _raw_spin_lock+0x5c/0x7c ufshcd_mcq_poll_cqe_lock+0x30/0xe0 ufs_mtk_mcq_intr+0x60/0x1bc [ufs_mediatek_mod] __handle_irq_event_percpu+0x140/0x3ec handle_irq_event+0x50/0xd8 handle_fasteoi_irq+0x148/0x2b0 generic_handle_domain_irq+0x4c/0x6c gic_handle_irq+0x58/0x134 call_on_irq_stack+0x40/0x74 do_interrupt_handler+0x84/0xe4 el1_interrupt+0x3c/0x78 Possible unsafe locking scenario: CPU0 ---- lock(&hwq->cq_lock); lock(&hwq->cq_lock); *** DEADLOCK *** 2 locks held by kworker/u16:4/260: [name:lockdep&] stack backtrace: CPU: 7 PID: 260 Comm: kworker/u16:4 Tainted: G S W OE 6.1.17-mainline-android14-2-g277223301adb #1 Workqueue: ufs_eh_wq_0 ufshcd_err_handler Call trace: dump_backtrace+0x10c/0x160 show_stack+0x20/0x30 dump_stack_lvl+0x98/0xd8 dump_stack+0x20/0x60 print_usage_bug+0x584/0x76c mark_lock_irq+0x488/0x510 mark_lock+0x1ec/0x25c __lock_acquire+0x4d8/0xffc lock_acquire+0x17c/0x33c _raw_spin_lock+0x5c/0x7c ufshcd_mcq_poll_cqe_lock+0x30/0xe0 ufshcd_poll+0x68/0x1b0 ufshcd_transfer_req_compl+0x9c/0xc8 ufshcd_err_handler+0x3bc/0xea0 process_one_work+0x2f4/0x7e8 worker_thread+0x234/0x450 kthread+0x110/0x134 ret_from_fork+0x10/0x20 The Linux kernel CVE team has assigned CVE-2023-53760 to this issue. Affected and fixed versions =========================== Issue introduced in 6.3 with commit ed975065c31c2a0372e13c19e8140b69814a98ba and fixed in 6.3.3 with commit 2ce8c49c7b53e0a2258b833eeab16a6d78f732d1 Issue introduced in 6.3 with commit ed975065c31c2a0372e13c19e8140b69814a98ba and fixed in 6.4 with commit 948afc69615167a3c82430f99bfd046332b89912 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-53760 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/ufs-mcq.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/2ce8c49c7b53e0a2258b833eeab16a6d78f732d1 https://git.kernel.org/stable/c/948afc69615167a3c82430f99bfd046332b89912