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]
Message-ID: <tip-3b68db0c1f80c763213f07db60b4feda186345f5@git.kernel.org>
Date:   Thu, 20 Oct 2016 02:21:52 -0700
From:   tip-bot for Dmitry Safonov <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     dsafonov@...tuozzo.com, mpatocka@...hat.com, xemul@...tuozzo.com,
        gorcunov@...nvz.org, hpa@...or.com, mingo@...nel.org,
        tglx@...utronix.de, 0x7f454c46@...il.com, oleg@...hat.com,
        linux-kernel@...r.kernel.org, kilobyte@...band.pl
Subject: [tip:x86/urgent] x86/signal: Remove bogus user_64bit_mode() check
 from sigaction_compat_abi()

Commit-ID:  3b68db0c1f80c763213f07db60b4feda186345f5
Gitweb:     http://git.kernel.org/tip/3b68db0c1f80c763213f07db60b4feda186345f5
Author:     Dmitry Safonov <0x7f454c46@...il.com>
AuthorDate: Thu, 20 Oct 2016 00:53:08 +0300
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Thu, 20 Oct 2016 11:17:12 +0200

x86/signal: Remove bogus user_64bit_mode() check from sigaction_compat_abi()

The recent introduction of SA_X32/IA32 sa_flags added a check for
user_64bit_mode() into sigaction_compat_abi(). user_64bit_mode() is true
for native 64bit processes and x32 processes.

Due to that the function returns w/o setting the SA_X32_ABI flag for X32
processes. In consequence the kernel attempts to deliver the signal to the
X32 process in native 64bit mode causing the process to segfault.

Remove the check, so the actual check for X32 mode which sets the ABI flag
can be reached. There is no side effect for native 64bit mode.

[ tglx: Rewrote changelog ]

Fixes: 6846351052e6 ("x86/signal: Add SA_{X32,IA32}_ABI sa_flags")
Reported-by: Mikulas Patocka <mpatocka@...hat.com>
Tested-by: Adam Borowski <kilobyte@...band.pl>
Signed-off-by: Dmitry Safonov <0x7f454c46@...il.com>
Cc: Dmitry Safonov <dsafonov@...tuozzo.com>
Cc: Oleg Nesterov <oleg@...hat.com>
Cc: linux-mm@...ck.org
Cc: Cyrill Gorcunov <gorcunov@...nvz.org>
Cc: Pavel Emelyanov <xemul@...tuozzo.com>
Link: http://lkml.kernel.org/r/CAJwJo6Z8ZWPqNfT6t-i8GW1MKxQrKDUagQqnZ%2B0%2B697%3DMyVeGg@mail.gmail.com
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
 arch/x86/kernel/signal_compat.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/x86/kernel/signal_compat.c b/arch/x86/kernel/signal_compat.c
index 40df337..ec1f756 100644
--- a/arch/x86/kernel/signal_compat.c
+++ b/arch/x86/kernel/signal_compat.c
@@ -105,9 +105,6 @@ void sigaction_compat_abi(struct k_sigaction *act, struct k_sigaction *oact)
 	/* Don't let flags to be set from userspace */
 	act->sa.sa_flags &= ~(SA_IA32_ABI | SA_X32_ABI);
 
-	if (user_64bit_mode(current_pt_regs()))
-		return;
-
 	if (in_ia32_syscall())
 		act->sa.sa_flags |= SA_IA32_ABI;
 	if (in_x32_syscall())

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ