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 D14BC26E6F6 for ; Sat, 4 Oct 2025 15:20:00 +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=1759591200; cv=none; b=X66f93ykWMQNajFZy678SYnuJJMIY6ynSm3svX/k8sRXGXYQqCmgabv4eDpfJKMAUswxXlNrIJKo6L7O7+9+lTdw5HQo7R67CwDGtkmJTonqL+YJI/w1DvDMACy6j/gUOxJfDyL9qoawxoltBPhchLCpZmQKfU/KFStexmUUF48= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759591200; c=relaxed/simple; bh=IkcsgQKEGODm2L9+gwc2XOJ77BqtX+mGW/7mIpgf9Zg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=l0J9Ku0dEd+gP+E0uDH+SpBmXY6QRZeDJZ0d5psnYhbWkWcMKYD2ThJ8gbfkvgRt7GEUqbNs4Ii4MbR1Xe+GmGWIpNcwXK7d4eeONHiW5GT25xGTNOXDc9UegZ/qPQ8TA7Fb1YwEvbxVrEg6LKCA9PQt6EyfE2j1aoq0xSp11NM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jfxDfPth; 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="jfxDfPth" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55C16C4CEF1; Sat, 4 Oct 2025 15:20:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759591200; bh=IkcsgQKEGODm2L9+gwc2XOJ77BqtX+mGW/7mIpgf9Zg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=jfxDfPthypFwhu45CE6oIPcKwegZSFfPMPZ5TYZ9Bw615QLWMUMeR9a7cyNvGCqc1 10pBkPHGNdGccFhL3N8nXOZbYnt0uPNtRx8Q50cbPql61q/k15jIxLJ3OLo2IJYeqr pvJgX0w2RUJMrU1ZhtFJxdFeURef6/KZ1oaNG70s= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53563: cpufreq: amd-pstate-ut: Fix kernel panic when loading the driver Date: Sat, 4 Oct 2025 17:17:17 +0200 Message-ID: <2025100451-CVE-2023-53563-5cbe@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=5191; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=WCnBMl7cjM/WgTuNCgcQAh1GOM+GfYz1G5wfMydsvuI=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkPrZL/T5h/fDF7omb2ZLfZVryRbt6hLgw9vrdeby2w4 a+Ln83cEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABNZV8aw4MKeWznSpk8boxZW HC5camd0fpPXRoZ5CnPt7Mys51cofBM5lF41q1Sk664+AA== 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: cpufreq: amd-pstate-ut: Fix kernel panic when loading the driver After loading the amd-pstate-ut driver, amd_pstate_ut_check_perf() and amd_pstate_ut_check_freq() use cpufreq_cpu_get() to get the policy of the CPU and mark it as busy. In these functions, cpufreq_cpu_put() should be used to release the policy, but it is not, so any other entity trying to access the policy is blocked indefinitely. One such scenario is when amd_pstate mode is changed, leading to the following splat: [ 1332.103727] INFO: task bash:2929 blocked for more than 120 seconds. [ 1332.110001] Not tainted 6.5.0-rc2-amd-pstate-ut #5 [ 1332.115315] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 1332.123140] task:bash state:D stack:0 pid:2929 ppid:2873 flags:0x00004006 [ 1332.123143] Call Trace: [ 1332.123145] [ 1332.123148] __schedule+0x3c1/0x16a0 [ 1332.123154] ? _raw_read_lock_irqsave+0x2d/0x70 [ 1332.123157] schedule+0x6f/0x110 [ 1332.123160] schedule_timeout+0x14f/0x160 [ 1332.123162] ? preempt_count_add+0x86/0xd0 [ 1332.123165] __wait_for_common+0x92/0x190 [ 1332.123168] ? __pfx_schedule_timeout+0x10/0x10 [ 1332.123170] wait_for_completion+0x28/0x30 [ 1332.123173] cpufreq_policy_put_kobj+0x4d/0x90 [ 1332.123177] cpufreq_policy_free+0x157/0x1d0 [ 1332.123178] ? preempt_count_add+0x58/0xd0 [ 1332.123180] cpufreq_remove_dev+0xb6/0x100 [ 1332.123182] subsys_interface_unregister+0x114/0x120 [ 1332.123185] ? preempt_count_add+0x58/0xd0 [ 1332.123187] ? __pfx_amd_pstate_change_driver_mode+0x10/0x10 [ 1332.123190] cpufreq_unregister_driver+0x3b/0xd0 [ 1332.123192] amd_pstate_change_driver_mode+0x1e/0x50 [ 1332.123194] store_status+0xe9/0x180 [ 1332.123197] dev_attr_store+0x1b/0x30 [ 1332.123199] sysfs_kf_write+0x42/0x50 [ 1332.123202] kernfs_fop_write_iter+0x143/0x1d0 [ 1332.123204] vfs_write+0x2df/0x400 [ 1332.123208] ksys_write+0x6b/0xf0 [ 1332.123210] __x64_sys_write+0x1d/0x30 [ 1332.123213] do_syscall_64+0x60/0x90 [ 1332.123216] ? fpregs_assert_state_consistent+0x2e/0x50 [ 1332.123219] ? exit_to_user_mode_prepare+0x49/0x1a0 [ 1332.123223] ? irqentry_exit_to_user_mode+0xd/0x20 [ 1332.123225] ? irqentry_exit+0x3f/0x50 [ 1332.123226] ? exc_page_fault+0x8e/0x190 [ 1332.123228] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 1332.123232] RIP: 0033:0x7fa74c514a37 [ 1332.123234] RSP: 002b:00007ffe31dd0788 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 1332.123238] RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007fa74c514a37 [ 1332.123239] RDX: 0000000000000008 RSI: 000055e27c447aa0 RDI: 0000000000000001 [ 1332.123241] RBP: 000055e27c447aa0 R08: 00007fa74c5d1460 R09: 000000007fffffff [ 1332.123242] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000008 [ 1332.123244] R13: 00007fa74c61a780 R14: 00007fa74c616600 R15: 00007fa74c615a00 [ 1332.123247] Fix this by calling cpufreq_cpu_put() wherever necessary. [ rjw: Subject and changelog edits ] The Linux kernel CVE team has assigned CVE-2023-53563 to this issue. Affected and fixed versions =========================== Issue introduced in 6.1 with commit 14eb1c96e3a3fd9cd377ac9af3c7a410f8bf1015 and fixed in 6.1.53 with commit fcf78a17bbb94bebaa912f0460a1848f7d374c94 Issue introduced in 6.1 with commit 14eb1c96e3a3fd9cd377ac9af3c7a410f8bf1015 and fixed in 6.4.16 with commit 84857640c67405eed258c461b3ef909002f1e201 Issue introduced in 6.1 with commit 14eb1c96e3a3fd9cd377ac9af3c7a410f8bf1015 and fixed in 6.5.3 with commit 0f74f12ee042fd72e45f0e8700e063c84ef3883b Issue introduced in 6.1 with commit 14eb1c96e3a3fd9cd377ac9af3c7a410f8bf1015 and fixed in 6.6 with commit 60dd283804479c4a52f995b713f448e2cd65b8c8 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-53563 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/cpufreq/amd-pstate-ut.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/fcf78a17bbb94bebaa912f0460a1848f7d374c94 https://git.kernel.org/stable/c/84857640c67405eed258c461b3ef909002f1e201 https://git.kernel.org/stable/c/0f74f12ee042fd72e45f0e8700e063c84ef3883b https://git.kernel.org/stable/c/60dd283804479c4a52f995b713f448e2cd65b8c8