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 9656E14264C for ; Tue, 21 May 2024 14:39:12 +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=1716302352; cv=none; b=bSfiPi987tbO/EGVSMUn0Mrn1xQdEkP+sRedaHR7vChv3KwajVjJ8CIMQLYmh9e54CmgNdDlyk+jbp1+moD8zNS4CGTLs9yZqkTGLX7mg3DC/eG7V36v5Hfi/ylIwROPNyoeqN69Dqf+4E2WEFgm5FzeO5wOw9x+fs1kEmN28zk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716302352; c=relaxed/simple; bh=UmiuoC0sgLasRmLIQ8oHuOU9itbY+V4aVxVhgQJ9DDk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=hWQgoPL6SZtLStEh6snQzIgaE1SmU8GS5vWx4/IT5duXsamT5nzkMusAlZ6k2gRMqwyfT1L+tqvur/Vi88wgY5Ppmgyn/CpC2p1cOCAIlW3iioZWEsC3AIMyjvR1MFRGUfRB00AP7fQIW6TV6gS4BpynYIouopjmWex0/9a5d3E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Cxb7Uf+K; 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="Cxb7Uf+K" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21B76C2BD11; Tue, 21 May 2024 14:39:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716302352; bh=UmiuoC0sgLasRmLIQ8oHuOU9itbY+V4aVxVhgQJ9DDk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Cxb7Uf+K6PE7YqZElWdlUm7+GQQJB+YaDDnI+1f2VNQU0vUYDvA5P6j4BLEbhPfp/ XEmPVHZxYSd9+TWenCX/oU5p5NZ+64aG4+qz1uFWC0W/Ab8hg7scoHIEy1kH0oAL2X NRtX9TlMC6LdZ9K5voiYhWKGi8Ao1J+DOrMNzOFU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47326: x86/signal: Detect and prevent an alternate signal stack overflow Date: Tue, 21 May 2024 16:36:00 +0200 Message-ID: <2024052133-CVE-2021-47326-fd53@gregkh> X-Mailer: git-send-email 2.45.1 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=3076; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=UmiuoC0sgLasRmLIQ8oHuOU9itbY+V4aVxVhgQJ9DDk=; b=owGbwMvMwCRo6H6F97bub03G02pJDGk+G003bJ91evmhFRbLgm7s+nx5v+bMnvxZmUutj1W8v vz30oN2sY5YFgZBJgZZMUWWL9t4ju6vOKToZWh7GmYOKxPIEAYuTgGYiMRfhgW9OQXCBSc99229 rLZzQ3OCjOvMR1UM8/RyPs9supi95qaCXAbb9wu62ekCmwE= 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/signal: Detect and prevent an alternate signal stack overflow The kernel pushes context on to the userspace stack to prepare for the user's signal handler. When the user has supplied an alternate signal stack, via sigaltstack(2), it is easy for the kernel to verify that the stack size is sufficient for the current hardware context. Check if writing the hardware context to the alternate stack will exceed it's size. If yes, then instead of corrupting user-data and proceeding with the original signal handler, an immediate SIGSEGV signal is delivered. Refactor the stack pointer check code from on_sig_stack() and use the new helper. While the kernel allows new source code to discover and use a sufficient alternate signal stack size, this check is still necessary to protect binaries with insufficient alternate signal stack size from data corruption. The Linux kernel CVE team has assigned CVE-2021-47326 to this issue. Affected and fixed versions =========================== Issue introduced in 3.15 with commit c2bc11f10a39 and fixed in 5.4.134 with commit 00fcd8f33e9b Issue introduced in 3.15 with commit c2bc11f10a39 and fixed in 5.10.52 with commit 74569cb9ed7b Issue introduced in 3.15 with commit c2bc11f10a39 and fixed in 5.12.19 with commit 74d6fcea1d89 Issue introduced in 3.15 with commit c2bc11f10a39 and fixed in 5.13.4 with commit afb04d0b5543 Issue introduced in 3.15 with commit c2bc11f10a39 and fixed in 5.14 with commit 2beb4a53fc3f Issue introduced in 3.14.3 with commit 5bc3ab30db9b 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-2021-47326 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/signal.c include/linux/sched/signal.h 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/00fcd8f33e9b9f57115c3b1cfc4cb96450c18796 https://git.kernel.org/stable/c/74569cb9ed7bc60e395927f55d3dc3be143a0164 https://git.kernel.org/stable/c/74d6fcea1d896800e60f1c675137efebd1a6c9a6 https://git.kernel.org/stable/c/afb04d0b5543a5bf8e157b9119fbfc52606f4c11 https://git.kernel.org/stable/c/2beb4a53fc3f1081cedc1c1a198c7f56cc4fc60c