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 7B7A21170E for ; Sat, 24 Feb 2024 14:57:22 +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=1708786642; cv=none; b=li/uYEPknzlH469MwyRepfPjbkLYDthhv80Wr6p7Dx1mh1TxnvpsnUxpMvzcRSnuua3GKfAaQxHPlIWaJNxkHW/0Qhv4Z25D8p7dd+dwXMOpydRgu4c9YwXbuyhibZVZGsPjKVHYLpwS3V8zYSB24y4spLmEsJTpLTKW+0HDEqM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708786642; c=relaxed/simple; bh=hLwhRcWsANm7EHFvnwnXahvN/qpEnJfWT6WdbbQTVDI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=teaKmUUxThswo9dwQOP2UhCka80VphQ2aFWGKJRT3EYgueggvlYAaPT7IRVbFMkSEODnA46W0Rxj7X6DiPJAWaYBNBgWPZXtLRzCI8JTMO/1GAHrHNzyLKZp15oT7r0EDExDVhHmHhdVYal0IWI6g79ubMgYAD4u6n2tqL4Yvlo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yYClliAU; 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="yYClliAU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 906A5C433F1; Sat, 24 Feb 2024 14:57:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1708786641; bh=hLwhRcWsANm7EHFvnwnXahvN/qpEnJfWT6WdbbQTVDI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=yYClliAU/lyMNicQDgf+KvaERdgpFxM71RSaegkY1ww+egRK5moo8DCHB/CMFdodg RjqjwJZiBJHxy8JvzfEbDfGXILiL8xHIafpy3d3qzYPze4vV/vvLLfwfNpShLjcXk9 0BZsp6bVMDFXm3VNOn4rSyHtFSNjZPLdEFn6Xyd8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26603: x86/fpu: Stop relying on userspace for info to fault in xsave buffer Date: Sat, 24 Feb 2024 15:57:15 +0100 Message-ID: <2024022415-CVE-2024-26603-42c2@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=2854; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=hLwhRcWsANm7EHFvnwnXahvN/qpEnJfWT6WdbbQTVDI=; b=owGbwMvMwCRo6H6F97bub03G02pJDKm3mE/vV79+NT3t0c1aB0eVQr13Xkcv3JdJ7DO9arrr7 PX7jr3pHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCR4zUM8/14A6+HaF+9mLfl YKaTsk3B93sfkxjmuxcGJK19Pbtas4J1obhh+sXHO6J0AA== 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: x86/fpu: Stop relying on userspace for info to fault in xsave buffer Before this change, the expected size of the user space buffer was taken from fx_sw->xstate_size. fx_sw->xstate_size can be changed from user-space, so it is possible construct a sigreturn frame where: * fx_sw->xstate_size is smaller than the size required by valid bits in fx_sw->xfeatures. * user-space unmaps parts of the sigrame fpu buffer so that not all of the buffer required by xrstor is accessible. In this case, xrstor tries to restore and accesses the unmapped area which results in a fault. But fault_in_readable succeeds because buf + fx_sw->xstate_size is within the still mapped area, so it goes back and tries xrstor again. It will spin in this loop forever. Instead, fault in the maximum size which can be touched by XRSTOR (taken from fpstate->user_size). [ dhansen: tweak subject / changelog ] The Linux kernel CVE team has assigned CVE-2024-26603 to this issue. Affected and fixed versions =========================== Issue introduced in 5.14 with commit fcb3635f5018 and fixed in 6.1.79 with commit 627339cccdc9 Issue introduced in 5.14 with commit fcb3635f5018 and fixed in 6.6.18 with commit b2479ab426ce Issue introduced in 5.14 with commit fcb3635f5018 and fixed in 6.7.6 with commit 627e28cbb655 Issue introduced in 5.14 with commit fcb3635f5018 and fixed in 6.8-rc4 with commit d877550eaf2d 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-2024-26603 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/x86/kernel/fpu/signal.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/627339cccdc9166792ecf96bc3c9f711a60ce996 https://git.kernel.org/stable/c/b2479ab426cef7ab79a13005650eff956223ced2 https://git.kernel.org/stable/c/627e28cbb65564e55008315d9e02fbb90478beda https://git.kernel.org/stable/c/d877550eaf2dc9090d782864c96939397a3c6835