The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Nikolay Borisov <nik.borisov@suse.com>
To: cve@kernel.org, linux-kernel@vger.kernel.org,
	linux-cve-announce@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: CVE-2021-47326: x86/signal: Detect and prevent an alternate signal stack overflow
Date: Thu, 23 May 2024 13:19:17 +0300	[thread overview]
Message-ID: <06570587-dc49-4885-83da-7a386f012106@suse.com> (raw)
In-Reply-To: <2024052133-CVE-2021-47326-fd53@gregkh>



On 21.05.24 г. 17:36 ч., Greg Kroah-Hartman wrote:
> 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.


I'd like to dispute this CVE. Basically a process can pass in a 
wrongly-sized stack which will cause its own stack to be corrupted. If 
anything this affects the process rather than the kernel.

> 
> 
> 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

       reply	other threads:[~2024-05-23 10:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2024052133-CVE-2021-47326-fd53@gregkh>
2024-05-23 10:19 ` Nikolay Borisov [this message]
2024-05-23 13:31   ` CVE-2021-47326: x86/signal: Detect and prevent an alternate signal stack overflow Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=06570587-dc49-4885-83da-7a386f012106@suse.com \
    --to=nik.borisov@suse.com \
    --cc=cve@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-cve-announce@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox