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


Groups > linux.kernel > #1737718 > unrolled thread

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

Started byEric Biggers <ebiggers3@gmail.com>
First post2017-09-22 19:50 +0200
Last post2017-09-23 11:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v4 0/3] x86/fpu: prevent leaking FPU registers via invalid FPU state Eric Biggers <ebiggers3@gmail.com> - 2017-09-22 19:50 +0200
    Re: [PATCH v4 0/3] x86/fpu: prevent leaking FPU registers via  invalid FPU state Ingo Molnar <mingo@kernel.org> - 2017-09-23 11:10 +0200

#1737718 — [PATCH v4 0/3] x86/fpu: prevent leaking FPU registers via invalid FPU state

FromEric Biggers <ebiggers3@gmail.com>
Date2017-09-22 19:50 +0200
Subject[PATCH v4 0/3] x86/fpu: prevent leaking FPU registers via invalid FPU state
Message-ID<usAfn-xX-3@gated-at.bofh.it>
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 v3:
    - Rebase onto tip/master

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        | 17 +++++-------
 arch/x86/kernel/fpu/signal.c        | 18 ++++++++-----
 arch/x86/kernel/fpu/xstate.c        | 52 ++++++++++++++-----------------------
 arch/x86/mm/extable.c               | 24 +++++++++++++++++
 6 files changed, 102 insertions(+), 85 deletions(-)

-- 
2.14.1.821.g8fa685d3b7-goog

[toc] | [next] | [standalone]


#1737981 — Re: [PATCH v4 0/3] x86/fpu: prevent leaking FPU registers via invalid FPU state

FromIngo Molnar <mingo@kernel.org>
Date2017-09-23 11:10 +0200
SubjectRe: [PATCH v4 0/3] x86/fpu: prevent leaking FPU registers via invalid FPU state
Message-ID<usOBI-18b-5@gated-at.bofh.it>
In reply to#1737718
* 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 v3:
>     - Rebase onto tip/master
> 
> 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        | 17 +++++-------
>  arch/x86/kernel/fpu/signal.c        | 18 ++++++++-----
>  arch/x86/kernel/fpu/xstate.c        | 52 ++++++++++++++-----------------------
>  arch/x86/mm/extable.c               | 24 +++++++++++++++++
>  6 files changed, 102 insertions(+), 85 deletions(-)

Thank you Eric - I've applied them and will push it all out together with the 
other pending bits in WIP.x86/fpu.

	Ingo

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web