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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue,  4 Apr 2017 18:15:01 +0200
From:   Joerg Roedel <joro@...tes.org>
To:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>
Cc:     x86@...nel.org, Dmitry Safonov <0x7f454c46@...il.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Joerg Roedel <jroedel@...e.de>, linux-kernel@...r.kernel.org,
        Borislav Petkov <bp@...e.de>
Subject: [PATCH] x86/signals: Fix lower/upper bound reporting in compat siginfo

From: Joerg Roedel <jroedel@...e.de>

Put the right values from the original siginfo into the
userspace compat-siginfo.

This fixes the 32-bit mpx tabletest on a 64-bit kernel.

Fixes: a4455082dc6f0 ('x86/signals: Add missing signal_compat code for x86 features')
Cc: Dave Hansen <dave.hansen@...ux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@...e.de>
---
 arch/x86/kernel/signal_compat.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/signal_compat.c b/arch/x86/kernel/signal_compat.c
index ec1f756..71beb28 100644
--- a/arch/x86/kernel/signal_compat.c
+++ b/arch/x86/kernel/signal_compat.c
@@ -151,8 +151,8 @@ int __copy_siginfo_to_user32(compat_siginfo_t __user *to, const siginfo_t *from,
 
 				if (from->si_signo == SIGSEGV) {
 					if (from->si_code == SEGV_BNDERR) {
-						compat_uptr_t lower = (unsigned long)&to->si_lower;
-						compat_uptr_t upper = (unsigned long)&to->si_upper;
+						compat_uptr_t lower = (unsigned long)from->si_lower;
+						compat_uptr_t upper = (unsigned long)from->si_upper;
 						put_user_ex(lower, &to->si_lower);
 						put_user_ex(upper, &to->si_upper);
 					}
-- 
1.9.1

Powered by blists - more mailing lists