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:   Thu, 14 Sep 2023 11:27:03 -0000
From:   "tip-bot2 for Nikolay Borisov" <tip-bot2@...utronix.de>
To:     linux-tip-commits@...r.kernel.org
Cc:     Nikolay Borisov <nik.borisov@...e.com>,
        Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org,
        linux-kernel@...r.kernel.org
Subject: [tip: x86/entry] x86/elf: Make loading of 32bit processes depend on
 ia32_enabled()

The following commit has been merged into the x86/entry branch of tip:

Commit-ID:     5ae2702d7c482edbf002499e23a2e22ac4047af1
Gitweb:        https://git.kernel.org/tip/5ae2702d7c482edbf002499e23a2e22ac4047af1
Author:        Nikolay Borisov <nik.borisov@...e.com>
AuthorDate:    Fri, 23 Jun 2023 14:14:07 +03:00
Committer:     Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Thu, 14 Sep 2023 13:19:53 +02:00

x86/elf: Make loading of 32bit processes depend on ia32_enabled()

Major aspect of ia32 emulation is the ability to load 32bit processes.
That's currently decided (among others) by compat_elf_check_arch().

Make the macro use ia32_enabled() to decide if IA32 compat is
enabled before loading a 32bit process.

Signed-off-by: Nikolay Borisov <nik.borisov@...e.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Link: https://lore.kernel.org/r/20230623111409.3047467-5-nik.borisov@suse.com

---
 arch/x86/include/asm/elf.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h
index 18fd06f..a0234df 100644
--- a/arch/x86/include/asm/elf.h
+++ b/arch/x86/include/asm/elf.h
@@ -7,6 +7,7 @@
  */
 #include <linux/thread_info.h>
 
+#include <asm/ia32.h>
 #include <asm/ptrace.h>
 #include <asm/user.h>
 #include <asm/auxvec.h>
@@ -149,7 +150,7 @@ do {						\
 	((x)->e_machine == EM_X86_64)
 
 #define compat_elf_check_arch(x)					\
-	(elf_check_arch_ia32(x) ||					\
+	((elf_check_arch_ia32(x) && ia32_enabled()) ||			\
 	 (IS_ENABLED(CONFIG_X86_X32_ABI) && (x)->e_machine == EM_X86_64))
 
 static inline void elf_common_init(struct thread_struct *t,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ