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 741AD3E48E for ; Wed, 6 Mar 2024 06:46:13 +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=1709707573; cv=none; b=lT/gIBNIj3Ff6O8e45LO6c9LGw5dWAuVUt6tYOfFRaD+aVNClpBiJ1/qO8zAnQe6WVySZQDHJXkvQAJYXRo8QzXDHBqGrhgSEIi2vcpc3vTFhkwMWkhAchsWvp4btVFcNdVdTprJ+7IfAej6+Sf/ldE6AQKrwfWXkdzn1MDUvvo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709707573; c=relaxed/simple; bh=bkbh4pyu0VlmiP9qwr1kkiEwyGGL1peXOccGfHT5Y6o=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=W3vHVn9aRtlP+q8X1j3+DYL61ZV/nFRtgYiHSf2sqIa1UNp6Co4vqqUA5mK/C1RL3T2OAUXJa0wPeUip5adKg1CkZGoOeN0bmuO7FzYR9e640s2YpTNaXstio2b1TM8sqO1yu1wQDV8KxOvcQNy1vlJq+a8rn4TJ0oXkcDbg/rM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FTdYJqAC; 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="FTdYJqAC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 014C9C433C7; Wed, 6 Mar 2024 06:46:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709707573; bh=bkbh4pyu0VlmiP9qwr1kkiEwyGGL1peXOccGfHT5Y6o=; h=From:To:Cc:Subject:Date:Reply-to:From; b=FTdYJqAC2uRSMuGuCwiW2cdCrUebl+P5otiehcSApO8kL34bWJ49ru/yEago6H6k+ ZwYZcOMPMxqnJnE0TzttugRNTM0dP8MjwH14M0/24Wrbofs25UTucdk2IloVbthfyO ddltqcF+0E9SL4aMjR3w3X7D1eKe5TzvYLLjZSJo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-52598: s390/ptrace: handle setting of fpc register correctly Date: Wed, 6 Mar 2024 06:45:56 +0000 Message-ID: <2024030646-CVE-2023-52598-d0a2@gregkh> X-Mailer: git-send-email 2.44.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=3217; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=bkbh4pyu0VlmiP9qwr1kkiEwyGGL1peXOccGfHT5Y6o=; b=owGbwMvMwCRo6H6F97bub03G02pJDKkvBKVikz4W5c/lumy7b+W7H5qVQc4LJxupTVif9Ebi4 o1nX89Yd8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEpnYxzOF80xB5atKU1Mdy lxNrnVpe/TQXf8Sw4Bz7wx2rtmidSlvVZWKWwa1dkzvJFAA= 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: s390/ptrace: handle setting of fpc register correctly If the content of the floating point control (fpc) register of a traced process is modified with the ptrace interface the new value is tested for validity by temporarily loading it into the fpc register. This may lead to corruption of the fpc register of the tracing process: if an interrupt happens while the value is temporarily loaded into the fpc register, and within interrupt context floating point or vector registers are used, the current fp/vx registers are saved with save_fpu_regs() assuming they belong to user space and will be loaded into fp/vx registers when returning to user space. test_fp_ctl() restores the original user space fpc register value, however it will be discarded, when returning to user space. In result the tracer will incorrectly continue to run with the value that was supposed to be used for the traced process. Fix this by saving fpu register contents with save_fpu_regs() before using test_fp_ctl(). The Linux kernel CVE team has assigned CVE-2023-52598 to this issue. Affected and fixed versions =========================== Fixed in 4.19.307 with commit 6ccf904aac02 Fixed in 5.4.269 with commit 6d0822f2cc9b Fixed in 5.10.210 with commit 856caf2730ea Fixed in 5.15.149 with commit 28a1f492cb52 Fixed in 6.1.77 with commit 7a4d6481fbdd Fixed in 6.6.16 with commit 02c6bbfb08ba Fixed in 6.7.4 with commit bdce67df7f12 Fixed in 6.8-rc1 with commit 8b13601d19c5 Please see https://www.kernel.org or 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-52598 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/s390/kernel/ptrace.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/6ccf904aac0292e1f6b1a1be6c407c414f7cf713 https://git.kernel.org/stable/c/6d0822f2cc9b153bf2df49a84599195a2e0d21a8 https://git.kernel.org/stable/c/856caf2730ea18cb39e95833719c02a02447dc0a https://git.kernel.org/stable/c/28a1f492cb527f64593457a0a0f0d809b3f36c25 https://git.kernel.org/stable/c/7a4d6481fbdd661f9e40e95febb95e3dee82bad3 https://git.kernel.org/stable/c/02c6bbfb08bad78dd014e24c7b893723c15ec7a1 https://git.kernel.org/stable/c/bdce67df7f12fb0409fbc604ce7c4254703f56d4 https://git.kernel.org/stable/c/8b13601d19c541158a6e18b278c00ba69ae37829