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-next>] [day] [month] [year] [list]
Message-Id: <cover.1405095200.git.luto@amacapital.net>
Date:	Fri, 11 Jul 2014 09:29:21 -0700
From:	Andy Lutomirski <luto@...capital.net>
To:	"H. Peter Anvin" <hpa@...or.com>, Andi Kleen <andi@...stfloor.org>
Cc:	Al Viro <viro@...IV.linux.org.uk>, x86@...nel.org,
	linux-kernel@...r.kernel.org, Andy Lutomirski <luto@...capital.net>
Subject: [PATCH 0/2] x86_64,signal: Fix the set of saved segment registers

The x86_64 signal code claims to save and restore CS, FS, and GS,
and it further claims that this is the minimal set that's needed.

Neither of these claims is true.  The code does not, and AFAICT
never has, saved or restored FS and GS, nor does it need to.  On the
other hand, all 64-bit syscalls (and rt_sigreturn in particular)
clobber SS, making it impossible for signal handlers to correctly
restore SS without using a trampoline or ptracing themselves.

This patchset saves and restores SS in the __pad0 slot and renames
the FS and GS slots __pad1 and __pad2 to more accurately document
their purpose.

I discovered this while writing a test for espfix64.

Andy Lutomirski (2):
  x86_64,signal: Save and restore SS in signal frames
  x86_64,signal: Remove 'fs' and 'gs' from sigcontext

 arch/x86/include/asm/sigcontext.h      |  6 +++---
 arch/x86/include/uapi/asm/sigcontext.h |  6 +++---
 arch/x86/kernel/signal.c               | 12 +++---------
 3 files changed, 9 insertions(+), 15 deletions(-)

-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ