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 7681E7E591 for ; Tue, 5 Nov 2024 17:11:21 +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=1730826681; cv=none; b=Z/h3Be/ulfAr+v4XB3SBZrCJyocEjXHWpT3RUjfTbVP7cj8EHt/mYD9WqmXQE5ZfmMamwbayHfHQ5mho/MvOO2UkMnPXzeSXkqTOp25mQT6menL0NYgIUquGic5Sz3sQiX00mLqnIhArqx49qXjaxyHyFJiqhOr/xxjJykKblVk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730826681; c=relaxed/simple; bh=A7Ph60v443ZKx0bseRtdQPxDdPE6B5gWyYgHwhiDQqs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=sr4pJLTD8sAJ2g/t+QE8PaN7Wu/ENjCiWvvdDlfe2FnabrN3BQtT9aUgB9kyM7yQQvWKot91BgjZbT7waiwqvN7HaJB+lh8Z59doeLNZ9RcWLrsFfW7xiSl64a1LELIlFGri7OSBqdzFNyd8nv4iOuE8gxZWFOPfRHmI2uz0xos= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=HebCq99r; 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="HebCq99r" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2549C4CECF; Tue, 5 Nov 2024 17:11:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1730826681; bh=A7Ph60v443ZKx0bseRtdQPxDdPE6B5gWyYgHwhiDQqs=; h=From:To:Cc:Subject:Date:Reply-to:From; b=HebCq99rZ5Y9sXJ4x+6tlrujkjyS8NZKz3TArrQRgYgfyOt2LpocK7mL6vQwfPCXX tc6a4nOhqDiB/cFTTNTE9mvmZXCkzr3L07Ewt/SjJkUJk4UcAWbSkqYwdGJ/3hwEWr iKN5HaPLJhk8EHquVUZVw+i+S9s7lS80AF4NYcmE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50102: x86: fix user address masking non-canonical speculation issue Date: Tue, 5 Nov 2024 18:10:51 +0100 Message-ID: <2024110553-CVE-2024-50102-3d1e@gregkh> X-Mailer: git-send-email 2.47.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=2819; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=A7Ph60v443ZKx0bseRtdQPxDdPE6B5gWyYgHwhiDQqs=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlagXPXxp0yu60e5XBjoq+b/7krDTPUb6T3912O/Gbit O/rYfmKjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjI2asMC+b9K+ls95mfZHrw 8uyrrryvQo+caGBYcDztQ8mJSNEu56xfJ7SNtFn3/2XMBwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: x86: fix user address masking non-canonical speculation issue It turns out that AMD has a "Meltdown Lite(tm)" issue with non-canonical accesses in kernel space. And so using just the high bit to decide whether an access is in user space or kernel space ends up with the good old "leak speculative data" if you have the right gadget using the result: CVE-2020-12965 “Transient Execution of Non-Canonical Accesses“ Now, the kernel surrounds the access with a STAC/CLAC pair, and those instructions end up serializing execution on older Zen architectures, which closes the speculation window. But that was true only up until Zen 5, which renames the AC bit [1]. That improves performance of STAC/CLAC a lot, but also means that the speculation window is now open. Note that this affects not just the new address masking, but also the regular valid_user_address() check used by access_ok(), and the asm version of the sign bit check in the get_user() helpers. It does not affect put_user() or clear_user() variants, since there's no speculative result to be used in a gadget for those operations. The Linux kernel CVE team has assigned CVE-2024-50102 to this issue. Affected and fixed versions =========================== Issue introduced in 6.4 with commit 6014bc27561f and fixed in 6.11.6 with commit 291313693677 Issue introduced in 6.4 with commit 6014bc27561f and fixed in 6.12-rc5 with commit 86e6b1547b3d 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-50102 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/include/asm/uaccess_64.h arch/x86/kernel/cpu/common.c arch/x86/kernel/vmlinux.lds.S arch/x86/lib/getuser.S 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/291313693677a345d4f50aae3c68e28b469f601e https://git.kernel.org/stable/c/86e6b1547b3d013bc392adf775b89318441403c2