lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 3 Feb 2016 03:07:47 +0800
From:	Lennox Wu <lennox.wu@...il.com>
To:	Stas Sergeev <stsp@...t.ru>,
	open list <linux-kernel@...r.kernel.org>,
	Liqin Chen <liqin.linux@...il.com>
Subject: Re: [PATCH 2/4] score: signal: fix sigaltstack check

Hi Sergeev,
Your are right. I will merge it.
Thanks.

Acked-by: Lennox Wu <lennox.wu@...il.com>

2016-02-01 0:21 GMT+08:00 Stas Sergeev <stsp@...t.ru>:
>
> Currently get_sigframe() checks only
> (ka->sa.sa_flags & SA_ONSTACK) && (!on_sig_stack(sp))
> to determine whether the switch to sigaltstack is needed.
> It forgets to checks whether the sigaltstack was previously set.
>
> This patch replaces the !on_sig_stack(sp) with the standard check
> sas_ss_flags(sp) == 0
> that takes into account both conditions: it succeeds only if the
> sigaltstack is enabled but currently not active.
>
> CC: Andy Lutomirski <luto@...capital.net>
> CC: linux-kernel@...r.kernel.org
> CC: Chen Liqin <liqin.linux@...il.com>
> CC: Lennox Wu <lennox.wu@...il.com>
> CC: Michael Ellerman <mpe@...erman.id.au>
> CC: Andrew Morton <akpm@...ux-foundation.org>
> CC: James Hogan <james.hogan@...tec.com>
>
> Signed-off-by: Stas Sergeev <stsp@...rs.sourceforge.net>
> ---
>  arch/score/kernel/signal.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/score/kernel/signal.c b/arch/score/kernel/signal.c
> index e381c8c..bd1c7c8 100644
> --- a/arch/score/kernel/signal.c
> +++ b/arch/score/kernel/signal.c
> @@ -127,7 +127,7 @@ static void __user *get_sigframe(struct k_sigaction *ka,
>      sp -= 32;
>
>      /* This is the X/Open sanctioned signal stack switching.  */
> -    if ((ka->sa.sa_flags & SA_ONSTACK) && (!on_sig_stack(sp)))
> +    if ((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags(sp) == 0))
>          sp = current->sas_ss_sp + current->sas_ss_size;
>
>      return (void __user*)((sp - frame_size) & ~7);
> --
> 2.5.0
>

Powered by blists - more mailing lists