Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1737190

Re: [PATCH v3 0/3] x86/fpu: prevent leaking FPU registers via invalid FPU state

From Ingo Molnar <mingo@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v3 0/3] x86/fpu: prevent leaking FPU registers via invalid FPU state
Date 2017-09-22 07:40 +0200
Message-ID <usoQV-2fe-1@gated-at.bofh.it> (permalink)
References <useRz-4B1-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


* Eric Biggers <ebiggers3@gmail.com> wrote:

> From: Eric Biggers <ebiggers@google.com>
> 
> This series fixes the bug found by syzkaller where the ptrace syscall
> can be used to set invalid bits in a task's FPU state.  I also found
> that an equivalent bug was reachable using the sigreturn syscall, so the
> first patch fixes the bug in both cases.
> 
> The other two patches start validating the other parts of the
> xstate_header and make it so that invalid FPU states can no longer be
> abused to leak the FPU registers of other processes.
> 
> Changes since v2:
>     - Use an exception handler to handle invalid FPU states
>       (suggested by Andy Lutomirski)
>     - Check the size of xstate_header.reserved at build time
>       (suggested by Dave Hansen)
> 
> Eric Biggers (3):
>   x86/fpu: don't let userspace set bogus xcomp_bv
>   x86/fpu: tighten validation of user-supplied xstate_header
>   x86/fpu: reinitialize FPU registers if restoring FPU state fails
> 
>  arch/x86/include/asm/fpu/internal.h | 51 +++++++++++--------------------------
>  arch/x86/include/asm/fpu/xstate.h   | 25 ++++++++++++++++++
>  arch/x86/kernel/fpu/regset.c        | 20 +++++++--------
>  arch/x86/kernel/fpu/signal.c        | 15 ++++++++---
>  arch/x86/kernel/fpu/xstate.c        | 27 ++++++++------------
>  arch/x86/mm/extable.c               | 24 +++++++++++++++++
>  6 files changed, 94 insertions(+), 68 deletions(-)

Ok - could you please rebase these to to tip:master that is at:

	git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git master

In particular this has a WIP.x86/fpu branch with FPU fixes+changes queued up but 
not merged upstream (yet), which conflict with these changes. I'd like to merge 
them all together.

Thanks,

	Ingo

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/3] x86/fpu: prevent leaking FPU registers via invalid FPU state Eric Biggers <ebiggers3@gmail.com> - 2017-09-21 21:00 +0200
  [PATCH v3 1/3] x86/fpu: don't let userspace set bogus xcomp_bv Eric Biggers <ebiggers3@gmail.com> - 2017-09-21 21:00 +0200
    Re: [kernel-hardening] [PATCH v3 1/3] x86/fpu: don't let userspace  set bogus xcomp_bv Rik van Riel <riel@redhat.com> - 2017-09-21 22:00 +0200
  [PATCH v3 2/3] x86/fpu: tighten validation of user-supplied xstate_header Eric Biggers <ebiggers3@gmail.com> - 2017-09-21 21:00 +0200
    Re: [kernel-hardening] [PATCH v3 2/3] x86/fpu: tighten validation  of user-supplied xstate_header Rik van Riel <riel@redhat.com> - 2017-09-21 22:30 +0200
  Re: [PATCH v3 0/3] x86/fpu: prevent leaking FPU registers via  invalid FPU state Ingo Molnar <mingo@kernel.org> - 2017-09-22 07:40 +0200
    Re: [PATCH v3 0/3] x86/fpu: prevent leaking FPU registers via  invalid FPU state Eric Biggers <ebiggers3@gmail.com> - 2017-09-22 19:10 +0200
      [PATCH] x86/fpu: Simplify fpu__activate_fpstate_read() Ingo Molnar <mingo@kernel.org> - 2017-09-23 12:20 +0200
        Re: [PATCH] x86/fpu: Simplify fpu__activate_fpstate_read() Ingo Molnar <mingo@kernel.org> - 2017-09-23 13:30 +0200
          Re: [PATCH] x86/fpu: Simplify fpu__activate_fpstate_read() Eric Biggers <ebiggers3@gmail.com> - 2017-09-23 20:30 +0200

csiph-web