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] [day] [month] [year] [list]
Message-ID: <87zgrnebyv.ffs@tglx>
Date:   Tue, 05 Oct 2021 17:19:04 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     "Chang S. Bae" <chang.seok.bae@...el.com>, bp@...e.de,
        luto@...nel.org, mingo@...nel.org, x86@...nel.org
Cc:     len.brown@...el.com, lenb@...nel.org, dave.hansen@...el.com,
        thiago.macieira@...el.com, jing2.liu@...el.com,
        ravi.v.shankar@...el.com, linux-kernel@...r.kernel.org,
        chang.seok.bae@...el.com
Subject: Re: [PATCH v11 16/29] x86/fpu/xstate: Support both legacy and
 expanded signal XSTATE size

On Fri, Oct 01 2021 at 15:37, Chang S. Bae wrote:
> @@ -1252,6 +1267,13 @@ long do_arch_prctl_state(struct task_struct *tsk, int option, unsigned long arg2
>  		if (!state_perm)
>  			return 0;
>  
> +		/*
> +		 * Disallow when sigaltstack is not enough for the
> +		 * AT_MINSIGSTKSZ value.
> +		 */
> +		if (tsk->sas_ss_size > 0 && tsk->sas_ss_size < get_sigframe_size())
> +			return -EPERM;

This is not enough:

T1
sigaltstack(minsize)
...
                            T2
                            libinit()
                            prctl(....) --> success
                            enable_amx()

libfunc()         
  if (amx_enabled())
       AMXINSN
       -->#NM --> success

handle_signal()
   die(because altstack too small);

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ