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 55A881E1A33 for ; Wed, 4 Sep 2024 18:37:05 +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=1725475025; cv=none; b=S69EB07f1sccaMkLzDkcQ/sjjq68K4BH49RSMLfHiGBa8bHR8/RBOwuopf+bUPKVaY1kSH5+Bcun/kidV0COzXvyYjQMxt0RJzJJaU/jgQ4uy+ULnV94dvIGPc/VBhYdGO2eZSheTAJXMv8Ywfy+Poky5KqvYZxvPeK3271daW8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725475025; c=relaxed/simple; bh=OLNok7FE2GvVRLZtCYSkAWsLrA9knw5icsr6YYeGkPg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=aLELyQ4aVFy+jfCF3OELljx2vg4BHdMqOyaSsUbWN3v1m+/PMM8KbYJrzQtpXSLE/n51IzzY1LkAlLuXpdDJJMz8aryvtXWEN47JOG/iDMq6wDE4DdTIVvbWgbQbviFJ2f5jPLiJs6CDSuJdJzPiJh44BsdJsDxuAoysnI3Zo1s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0Wy7YS3l; 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="0Wy7YS3l" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3EC0C4CEC2; Wed, 4 Sep 2024 18:37:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1725475025; bh=OLNok7FE2GvVRLZtCYSkAWsLrA9knw5icsr6YYeGkPg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=0Wy7YS3l/X/rgVHRDsWGDzzkLTlftCkRV5+JGnZvgJaM7LgwH0dcq4OHrly0lLqVA Q4Kn+PB87vfqcovUutxFGmoyrDIzQvkWXGZU7Q6TfBPu0UoFHhs1Rk14BoVQm8v4jh Zi4uf5/0MnM1Rl5fm3ef4jaRsWFSJvWgi/AHU5TA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-44953: scsi: ufs: core: Fix deadlock during RTC update Date: Wed, 4 Sep 2024 20:36:13 +0200 Message-ID: <2024090411-CVE-2024-44953-1a10@gregkh> X-Mailer: git-send-email 2.46.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=3166; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=OLNok7FE2GvVRLZtCYSkAWsLrA9knw5icsr6YYeGkPg=; b=owGbwMvMwCRo6H6F97bub03G02pJDGk3VswumfTuWu/GXffavd/7LVvDuodBXOV/x960vfX8Q n4lH1W+d8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBE/BYzzBUUvx0husy9YOZt z8K/itXzJL6beDEsaDn7ZGX8Eud+DvtFl1uvzbwcXP5xNgA= 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: ufs: core: Fix deadlock during RTC update There is a deadlock when runtime suspend waits for the flush of RTC work, and the RTC work calls ufshcd_rpm_get_sync() to wait for runtime resume. Here is deadlock backtrace: kworker/0:1 D 4892.876354 10 10971 4859 0x4208060 0x8 10 0 120 670730152367 ptr f0ffff80c2e40000 0 1 0x00000001 0x000000ff 0x000000ff 0x000000ff __switch_to+0x1a8/0x2d4 __schedule+0x684/0xa98 schedule+0x48/0xc8 schedule_timeout+0x48/0x170 do_wait_for_common+0x108/0x1b0 wait_for_completion+0x44/0x60 __flush_work+0x39c/0x424 __cancel_work_sync+0xd8/0x208 cancel_delayed_work_sync+0x14/0x28 __ufshcd_wl_suspend+0x19c/0x480 ufshcd_wl_runtime_suspend+0x3c/0x1d4 scsi_runtime_suspend+0x78/0xc8 __rpm_callback+0x94/0x3e0 rpm_suspend+0x2d4/0x65c __pm_runtime_suspend+0x80/0x114 scsi_runtime_idle+0x38/0x6c rpm_idle+0x264/0x338 __pm_runtime_idle+0x80/0x110 ufshcd_rtc_work+0x128/0x1e4 process_one_work+0x26c/0x650 worker_thread+0x260/0x3d8 kthread+0x110/0x134 ret_from_fork+0x10/0x20 Skip updating RTC if RPM state is not RPM_ACTIVE. The Linux kernel CVE team has assigned CVE-2024-44953 to this issue. Affected and fixed versions =========================== Issue introduced in 6.8 with commit 6bf999e0eb41 and fixed in 6.10.5 with commit f13f1858a28c Issue introduced in 6.8 with commit 6bf999e0eb41 and fixed in 6.11-rc2 with commit 3911af778f20 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-2024-44953 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-priv.h 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/f13f1858a28c68b7fc0d72c2008d5c1f80d2e8d5 https://git.kernel.org/stable/c/3911af778f208e5f49d43ce739332b91e26bc48e