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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1412386843.9388.176.camel@decadent.org.uk>
Date:	Sat, 04 Oct 2014 02:40:43 +0100
From:	Ben Hutchings <ben@...adent.org.uk>
To:	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>
Cc:	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RESEND] x86: Reject x32 executables if x32 ABI not
 supported

Can one of you please respond to this patch?

Ben.

On Sun, 2014-09-07 at 21:05 +0100, Ben Hutchings wrote:
> It is currently possible to execve() an x32 executable on an x86_64
> kernel that has only ia32 compat enabled.  However all its syscalls
> will fail, even _exit().  This usually causes it to segfault.
> 
> Change the ELF compat architecture check so that x32 executables are
> rejected if we don't support the x32 ABI.
> 
> Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
> ---
>  arch/x86/include/asm/elf.h | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h
> index 1a055c8..ca3347a 100644
> --- a/arch/x86/include/asm/elf.h
> +++ b/arch/x86/include/asm/elf.h
> @@ -160,8 +160,9 @@ do {						\
>  #define elf_check_arch(x)			\
>  	((x)->e_machine == EM_X86_64)
>  
> -#define compat_elf_check_arch(x)		\
> -	(elf_check_arch_ia32(x) || (x)->e_machine == EM_X86_64)
> +#define compat_elf_check_arch(x)					\
> +	(elf_check_arch_ia32(x) ||					\
> +	 (IS_ENABLED(CONFIG_X86_X32_ABI) && (x)->e_machine == EM_X86_64))
>  
>  #if __USER32_DS != __USER_DS
>  # error "The following code assumes __USER32_DS == __USER_DS"
> 
> 

-- 
Ben Hutchings
One of the nice things about standards is that there are so many of them.

Download attachment "signature.asc" of type "application/pgp-signature" (812 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ