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: <20150316081153.GA16393@gmail.com>
Date:	Mon, 16 Mar 2015 09:11:53 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Andy Lutomirski <luto@...nel.org>
Cc:	Andi Kleen <andi@...stfloor.org>, "H. Peter Anvin" <hpa@...or.com>,
	Al Viro <viro@...iv.linux.org.uk>, x86@...nel.org,
	linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Oleg Nesterov <oleg@...hat.com>,
	Borislav Petkov <bp@...en8.de>,
	Andy Lutomirski <luto@...capital.net>
Subject: Re: [PATCH v3 1/2] x86_64,signal: Fix SS handling for signals
 delivered to 64-bit programs


* Andy Lutomirski <luto@...nel.org> wrote:

> From: Andy Lutomirski <luto@...capital.net>
> 
> The comment in the signal code says that apps can save/restore other 
> segments on their own.  It's true that apps can *save* SS on their 
> own, but there's no way for apps to restore it: SYSCALL effectively 
> resets SS to __USER_DS, so any value that user code tries to load 
> into SS gets lost on entry to sigreturn.
> 
> This recycles two padding bytes in the segment selector area for SS.
> 
> While we're at it, we need a second change to make this useful.  If 
> the signal we're delivering is caused by a bad SS value, saving that 
> value isn't enough.  We need to remove that bad value from the regs 
> before we try to deliver the signal.  Oddly, x32 already got this 
> right.

Note, it's the original i386 code that got this right, not the 
(relatively new) x32 code. I fixed this in the commit that I applied.

Thanks,

	Ingo
--
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