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:	Sat, 3 May 2014 06:54:18 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Andy Lutomirski <luto@...capital.net>,
	Thomas Gleixner <tglx@...utronix.de>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"the arch/x86 maintainers" <x86@...nel.org>
Subject: Re: [PATCH v2] x86: Return to kernel without IRET

On Fri, May 2, 2014 at 11:12 PM, H. Peter Anvin <hpa@...or.com> wrote:
> On 05/02/2014 09:32 PM, Linus Torvalds wrote:
>>
>> At least as a proof-of-concept, having a code sequence in user mode
>> trampoline that does
>>
>>    popq %rsi
>>    popq %r11
>>    retq $128
>>
>> and building up a stack in user space at '%rsp-128' that has the
>> values or rsi/r11/rip should allow us to use 'sysret'. Hmm?
>
> That would be a security hole if another userspace thread could muck
> with the stack.

No, all of the above is in user space, and the pre-restore register
values for rsi/r11/rip/rsp are all user space values (just not the
right ones for the "real" return point). So no security issue.

Now, replacing "iret" with "sysret + user-space trampoline" doesn't
work in general (it gets RF wrong, for example, so it's useless for
single-stepping and breakpoint handling), but I was more thinking that
it would be an interesting way to see what the performance impact of a
faster iret would be.

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