From: Ingo Molnar <mingo@kernel.org>
To: Eric Biggers <ebiggers3@gmail.com>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
kernel-hardening@lists.openwall.com,
Andy Lutomirski <luto@kernel.org>,
Dave Hansen <dave.hansen@linux.intel.com>,
Dmitry Vyukov <dvyukov@google.com>,
Fenghua Yu <fenghua.yu@intel.com>, Kevin Hao <haokexin@gmail.com>,
Oleg Nesterov <oleg@redhat.com>,
Wanpeng Li <wanpeng.li@hotmail.com>,
Yu-cheng Yu <yu-cheng.yu@intel.com>,
Michael Halcrow <mhalcrow@google.com>,
Eric Biggers <ebiggers@google.com>
Subject: [kernel-hardening] Re: [PATCH v3 0/3] x86/fpu: prevent leaking FPU registers via invalid FPU state
Date: Fri, 22 Sep 2017 07:33:14 +0200 [thread overview]
Message-ID: <20170922053314.wryoupq2vgrel24c@gmail.com> (raw)
In-Reply-To: <20170921185239.88398-1-ebiggers3@gmail.com>
* 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
WARNING: multiple messages have this Message-ID (diff)
From: Ingo Molnar <mingo@kernel.org>
To: Eric Biggers <ebiggers3@gmail.com>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
kernel-hardening@lists.openwall.com,
Andy Lutomirski <luto@kernel.org>,
Dave Hansen <dave.hansen@linux.intel.com>,
Dmitry Vyukov <dvyukov@google.com>,
Fenghua Yu <fenghua.yu@intel.com>, Kevin Hao <haokexin@gmail.com>,
Oleg Nesterov <oleg@redhat.com>,
Wanpeng Li <wanpeng.li@hotmail.com>,
Yu-cheng Yu <yu-cheng.yu@intel.com>,
Michael Halcrow <mhalcrow@google.com>,
Eric Biggers <ebiggers@google.com>
Subject: Re: [PATCH v3 0/3] x86/fpu: prevent leaking FPU registers via invalid FPU state
Date: Fri, 22 Sep 2017 07:33:14 +0200 [thread overview]
Message-ID: <20170922053314.wryoupq2vgrel24c@gmail.com> (raw)
In-Reply-To: <20170921185239.88398-1-ebiggers3@gmail.com>
* 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
next prev parent reply other threads:[~2017-09-22 5:33 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-21 18:52 [kernel-hardening] [PATCH v3 0/3] x86/fpu: prevent leaking FPU registers via invalid FPU state Eric Biggers
2017-09-21 18:52 ` Eric Biggers
2017-09-21 18:52 ` [kernel-hardening] [PATCH v3 1/3] x86/fpu: don't let userspace set bogus xcomp_bv Eric Biggers
2017-09-21 18:52 ` Eric Biggers
2017-09-21 19:59 ` [kernel-hardening] " Rik van Riel
2017-09-21 18:52 ` [kernel-hardening] [PATCH v3 2/3] x86/fpu: tighten validation of user-supplied xstate_header Eric Biggers
2017-09-21 18:52 ` Eric Biggers
2017-09-21 20:21 ` [kernel-hardening] " Rik van Riel
2017-09-21 18:52 ` [kernel-hardening] [PATCH v3 3/3] x86/fpu: reinitialize FPU registers if restoring FPU state fails Eric Biggers
2017-09-21 18:52 ` Eric Biggers
2017-09-21 20:41 ` [kernel-hardening] " Rik van Riel
2017-09-22 5:33 ` Ingo Molnar [this message]
2017-09-22 5:33 ` [PATCH v3 0/3] x86/fpu: prevent leaking FPU registers via invalid FPU state Ingo Molnar
2017-09-22 17:07 ` [kernel-hardening] " Eric Biggers
2017-09-22 17:07 ` Eric Biggers
2017-09-23 10:17 ` [kernel-hardening] [PATCH] x86/fpu: Simplify fpu__activate_fpstate_read() Ingo Molnar
2017-09-23 10:17 ` Ingo Molnar
2017-09-23 11:29 ` [kernel-hardening] " Ingo Molnar
2017-09-23 11:29 ` Ingo Molnar
2017-09-23 18:28 ` [kernel-hardening] " Eric Biggers
2017-09-23 18:28 ` Eric Biggers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170922053314.wryoupq2vgrel24c@gmail.com \
--to=mingo@kernel.org \
--cc=dave.hansen@linux.intel.com \
--cc=dvyukov@google.com \
--cc=ebiggers3@gmail.com \
--cc=ebiggers@google.com \
--cc=fenghua.yu@intel.com \
--cc=haokexin@gmail.com \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mhalcrow@google.com \
--cc=oleg@redhat.com \
--cc=wanpeng.li@hotmail.com \
--cc=x86@kernel.org \
--cc=yu-cheng.yu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.