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


Groups > linux.kernel > #1735411

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

From Kees Cook <keescook@chromium.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 0/3] x86/fpu: prevent leaking FPU registers via invalid FPU state
Date 2017-09-20 05:10 +0200
Message-ID <urDyG-5Fl-9@gated-at.bofh.it> (permalink)
References <urBnb-42V-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Sep 19, 2017 at 5:44 PM, Eric Biggers <ebiggers3@gmail.com> wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> This is a second attempt to fix 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.
>
> 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

This series looks sensible to me! Thanks for getting this fixed up.

Reviewed-by: Kees Cook <keescook@chromium.org>

-Kees

>
>  arch/x86/include/asm/fpu/internal.h | 29 ++++++++++++++++++++---------
>  arch/x86/include/asm/fpu/xstate.h   | 19 +++++++++++++++++++
>  arch/x86/kernel/fpu/core.c          | 16 ++++++++++++++++
>  arch/x86/kernel/fpu/regset.c        | 20 +++++++++-----------
>  arch/x86/kernel/fpu/signal.c        | 15 +++++++++++----
>  arch/x86/kernel/fpu/xstate.c        | 27 ++++++++++-----------------
>  6 files changed, 85 insertions(+), 41 deletions(-)
>
> --
> 2.14.1.690.gbb1197296e-goog
>



-- 
Kees Cook
Pixel Security

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


Thread

[PATCH v2 0/3] x86/fpu: prevent leaking FPU registers via invalid FPU state Eric Biggers <ebiggers3@gmail.com> - 2017-09-20 02:50 +0200
  [PATCH v2 1/3] x86/fpu: don't let userspace set bogus xcomp_bv Eric Biggers <ebiggers3@gmail.com> - 2017-09-20 02:50 +0200
    Re: [lkp-robot] [x86/fpu]  14e633085a:  Kernel_panic-not_syncing:Attempted_to_kill_init!exitcode= Eric Biggers <ebiggers3@gmail.com> - 2017-09-26 05:10 +0200
  Re: [PATCH v2 0/3] x86/fpu: prevent leaking FPU registers via invalid  FPU state Kees Cook <keescook@chromium.org> - 2017-09-20 05:10 +0200

csiph-web