Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1237717
| From | Andy Lutomirski <luto@amacapital.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 26/26] x86, pkeys: Documentation |
| Date | 2015-10-01 22:50 +0200 |
| Message-ID | <qeSXD-7fI-5@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <qb13r-4sC-1@gated-at.bofh.it> <qcbtN-7ST-37@gated-at.bofh.it> <qckdI-3Kz-5@gated-at.bofh.it> <qeK42-2oH-7@gated-at.bofh.it> <qeSNY-71t-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Oct 1, 2015 at 1:39 PM, Kees Cook <keescook@google.com> wrote: > On Thu, Oct 1, 2015 at 4:17 AM, Ingo Molnar <mingo@kernel.org> wrote: >> >> * Dave Hansen <dave@sr71.net> wrote: >> >>> > If yes then this could be a significant security feature / usecase for pkeys: > > Which CPUs (will) have pkeys? > >>> > executable sections of shared libraries and binaries could be mapped with pkey >>> > access disabled. If I read the Intel documentation correctly then that should >>> > be possible. >>> >>> Agreed. I've even heard from some researchers who are interested in this: >>> >>> https://www.infsec.cs.uni-saarland.de/wp-content/uploads/sites/2/2014/10/nuernberger2014ccs_disclosure.pdf >> >> So could we try to add an (opt-in) kernel option that enables this transparently >> and automatically for all PROT_EXEC && !PROT_WRITE mappings, without any >> user-space changes and syscalls necessary? > > I would like this very much. :) > >> Beyond the security improvement, this would enable this hardware feature on most >> x86 Linux distros automatically, on supported hardware, which is good for testing. >> >> Assuming it boots up fine on a typical distro, i.e. assuming that there are no >> surprises where PROT_READ && PROT_EXEC sections are accessed as data. > > I can't wait to find out what implicitly expects PROT_READ from > PROT_EXEC mappings. :) There's one annoying issue at least: mprotect_pkey(..., PROT_READ | PROT_EXEC, 0) sets protection key 0. mprotect_pkey(..., PROT_EXEC, 0) maybe sets protection key 15 or whatever we use for this. What does mprotect_pkey(..., PROT_EXEC, 0) do? What if the caller actually wants key 0? What if some CPU vendor some day implements --x for real? Also, how do we do mprotect_pkey and say "don't change the key"? > > -Kees > > -- > Kees Cook > Chrome OS Security -- Andy Lutomirski AMA Capital Management, LLC -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH 26/26] x86, pkeys: Documentation Ingo Molnar <mingo@kernel.org> - 2015-09-24 12:00 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Andy Lutomirski <luto@amacapital.net> - 2015-09-24 21:20 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Ingo Molnar <mingo@kernel.org> - 2015-09-25 09:20 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Dave Hansen <dave@sr71.net> - 2015-09-24 21:20 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Ingo Molnar <mingo@kernel.org> - 2015-09-25 08:20 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Ingo Molnar <mingo@kernel.org> - 2015-10-01 13:20 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Kees Cook <keescook@google.com> - 2015-10-01 22:40 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Andy Lutomirski <luto@amacapital.net> - 2015-10-01 22:50 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Ingo Molnar <mingo@kernel.org> - 2015-10-02 08:30 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Dave Hansen <dave@sr71.net> - 2015-10-02 20:00 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Ingo Molnar <mingo@kernel.org> - 2015-10-03 09:30 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Dave Hansen <dave@sr71.net> - 2015-10-01 23:00 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Dave Hansen <dave@sr71.net> - 2015-10-02 00:40 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Dave Hansen <dave@sr71.net> - 2015-10-02 00:40 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Kees Cook <keescook@google.com> - 2015-10-02 00:40 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Linus Torvalds <torvalds@linux-foundation.org> - 2015-10-02 00:50 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Dave Hansen <dave@sr71.net> - 2015-10-02 01:00 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Linus Torvalds <torvalds@linux-foundation.org> - 2015-10-02 03:40 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Dave Hansen <dave@sr71.net> - 2015-10-02 20:10 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Ingo Molnar <mingo@kernel.org> - 2015-10-02 09:10 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Ingo Molnar <mingo@kernel.org> - 2015-10-03 09:00 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Paolo Bonzini <pbonzini@redhat.com> - 2015-10-02 13:50 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Linus Torvalds <torvalds@linux-foundation.org> - 2015-10-02 14:00 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Paolo Bonzini <pbonzini@redhat.com> - 2015-10-02 14:20 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Ingo Molnar <mingo@kernel.org> - 2015-10-03 08:50 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Andy Lutomirski <luto@amacapital.net> - 2015-10-02 01:00 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Ingo Molnar <mingo@kernel.org> - 2015-10-02 08:10 +0200
Re: [PATCH 26/26] x86, pkeys: Documentation Ingo Molnar <mingo@kernel.org> - 2015-10-03 10:20 +0200
csiph-web