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 3AB5B2D1F64 for ; Thu, 3 Jul 2025 08:39:23 +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=1751531963; cv=none; b=neOMhIPF0SixK1nThz6cackCk2RzYyLXuAxvw0UD7KSyAlpGRNB1L9ioZhDjFn2GoqU4GnKa2K+p6XOyBSZj2tDmFpsdhiCxmwHaADf0G1c0EfjJ4fhf/3As3qRT6XOPrus3Zs7JDheTxDp83UI0uV6zB0lb+M2WsExu1Z0vscI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751531963; c=relaxed/simple; bh=3y/34YGWH6dpp/9BMUsP9mjedM3vK0v0V6k/RxPrCI4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=elIQ4CTagjbbCdB8tyFxBPG8AHBXVAwm/55IDqEl2h7quHr//WZVgMnZ0962WXPVDHr0qc2xk+azRTckcxUjUpnixD505ZwRDKC6qD1gQy1KLmd5yd2pgVMXoNPuqdcP3gY1QVUNx16bJ2tcp+OoEIUutMeyLylgBLwOFvwBCuE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=oPClGQme; 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="oPClGQme" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B698C4CEE3; Thu, 3 Jul 2025 08:39:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1751531963; bh=3y/34YGWH6dpp/9BMUsP9mjedM3vK0v0V6k/RxPrCI4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=oPClGQmed17gqiYRqrxsEsh8/AXaDu3kGn2djYLmw5P+0JRaMRsvxm9STeFe4dZfF 75+pj1r4hGAsohS5AR4fMd7w61hbQ+QQrYCShyDJQhcHRN9kLCFVaMTxX/a/RAg81I FAC9aQVTJrJyjxd/PgZqegsJZX1DS/l0PO/umY8I= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38169: arm64/fpsimd: Avoid clobbering kernel FPSIMD state with SMSTOP Date: Thu, 3 Jul 2025 10:36:25 +0200 Message-ID: <2025070342-CVE-2025-38169-11b6@gregkh> X-Mailer: git-send-email 2.50.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=2976; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=rLD97qeOsItU7684ltepCmwLSK8lJpqWeRPPIDfb/ZA=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlpDvdUd19i3XZz+uR05kO7BbKetbTfmPKf68+FlfH3C xpOHFS36IhlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJPLzNMIe7a7VLSBjf28Uv 4icukfbq89Of7s8wvyoujvtldYHezRtqFW8Eju2esj3RHQA= 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: arm64/fpsimd: Avoid clobbering kernel FPSIMD state with SMSTOP On system with SME, a thread's kernel FPSIMD state may be erroneously clobbered during a context switch immediately after that state is restored. Systems without SME are unaffected. If the CPU happens to be in streaming SVE mode before a context switch to a thread with kernel FPSIMD state, fpsimd_thread_switch() will restore the kernel FPSIMD state using fpsimd_load_kernel_state() while the CPU is still in streaming SVE mode. When fpsimd_thread_switch() subsequently calls fpsimd_flush_cpu_state(), this will execute an SMSTOP, causing an exit from streaming SVE mode. The exit from streaming SVE mode will cause the hardware to reset a number of FPSIMD/SVE/SME registers, clobbering the FPSIMD state. Fix this by calling fpsimd_flush_cpu_state() before restoring the kernel FPSIMD state. The Linux kernel CVE team has assigned CVE-2025-38169 to this issue. Affected and fixed versions =========================== Issue introduced in 6.10 with commit e92bee9f861b466c676f0200be3e46af7bc4ac6b and fixed in 6.12.34 with commit 55d52af498daea75aa03ba9b7e444c8ae495ac20 Issue introduced in 6.10 with commit e92bee9f861b466c676f0200be3e46af7bc4ac6b and fixed in 6.15.3 with commit a305821f597ec943849d3e53924adb88c61ed682 Issue introduced in 6.10 with commit e92bee9f861b466c676f0200be3e46af7bc4ac6b and fixed in 6.16-rc1 with commit 01098d893fa8a6edb2b56e178b798e3e6b674f02 Issue introduced in 6.8.12 with commit e003c485ac82a9f8de4204912ed059ac6dd4257c Issue introduced in 6.9.3 with commit 25b90cd122d546823da90b916f7c3289dfe83a99 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-2025-38169 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: arch/arm64/kernel/fpsimd.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/55d52af498daea75aa03ba9b7e444c8ae495ac20 https://git.kernel.org/stable/c/a305821f597ec943849d3e53924adb88c61ed682 https://git.kernel.org/stable/c/01098d893fa8a6edb2b56e178b798e3e6b674f02