All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rik van Riel <riel@redhat.com>
To: Eric Biggers <ebiggers3@gmail.com>, x86@kernel.org
Cc: 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>, Ingo Molnar <mingo@kernel.org>,
	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: [kernel-hardening] [PATCH v3 2/3] x86/fpu: tighten validation of user-supplied xstate_header
Date: Thu, 21 Sep 2017 16:21:47 -0400	[thread overview]
Message-ID: <1506025307.5486.24.camel@redhat.com> (raw)
In-Reply-To: <20170921185239.88398-3-ebiggers3@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1467 bytes --]

On Thu, 2017-09-21 at 11:52 -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> Move validation of user-supplied xstate_headers into a helper
> function
> and call it from both the ptrace and sigreturn syscall paths.  The
> new
> function also considers it to be an error if *any* reserved bits are
> set, whereas before we were just clearing most of them.
> 
> This should reduce the chance of bugs that fail to correctly validate
> user-supplied XSAVE areas.  It also will expose any broken userspace
> programs that set the other reserved bits; this is desirable because
> such programs will lose compatibility with future CPUs and kernels if
> those bits are ever used for anything.  (There shouldn't be any such
> programs, and in fact in the case where the compacted format is in
> use
> we were already validating xfeatures.  But you never know...)
> 
> Reviewed-by: Kees Cook <keescook@chromium.org>
> Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Andy Lutomirski <luto@kernel.org>
> Cc: Dmitry Vyukov <dvyukov@google.com>
> Cc: Fenghua Yu <fenghua.yu@intel.com>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Kevin Hao <haokexin@gmail.com>
> Cc: Oleg Nesterov <oleg@redhat.com>
> Cc: Wanpeng Li <wanpeng.li@hotmail.com>
> Cc: Yu-cheng Yu <yu-cheng.yu@intel.com>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> 
Reviewed-by: Rik van Riel <riel@redhat.com>

-- 
All rights reversed

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2017-09-21 20:21 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-21 18:52 [PATCH v3 0/3] x86/fpu: prevent leaking FPU registers via invalid FPU state Eric Biggers
2017-09-21 18:52 ` [kernel-hardening] " Eric Biggers
2017-09-21 18:52 ` [PATCH v3 1/3] x86/fpu: don't let userspace set bogus xcomp_bv Eric Biggers
2017-09-21 18:52   ` [kernel-hardening] " Eric Biggers
2017-09-21 19:59   ` Rik van Riel
2017-09-21 18:52 ` [PATCH v3 2/3] x86/fpu: tighten validation of user-supplied xstate_header Eric Biggers
2017-09-21 18:52   ` [kernel-hardening] " Eric Biggers
2017-09-21 20:21   ` Rik van Riel [this message]
2017-09-21 18:52 ` [PATCH v3 3/3] x86/fpu: reinitialize FPU registers if restoring FPU state fails Eric Biggers
2017-09-21 18:52   ` [kernel-hardening] " Eric Biggers
2017-09-21 20:41   ` Rik van Riel
2017-09-22  5:33 ` [PATCH v3 0/3] x86/fpu: prevent leaking FPU registers via invalid FPU state Ingo Molnar
2017-09-22  5:33   ` [kernel-hardening] " Ingo Molnar
2017-09-22 17:07   ` Eric Biggers
2017-09-22 17:07     ` [kernel-hardening] " Eric Biggers
2017-09-23 10:17     ` [PATCH] x86/fpu: Simplify fpu__activate_fpstate_read() Ingo Molnar
2017-09-23 10:17       ` [kernel-hardening] " Ingo Molnar
2017-09-23 11:29       ` Ingo Molnar
2017-09-23 11:29         ` [kernel-hardening] " Ingo Molnar
2017-09-23 18:28         ` Eric Biggers
2017-09-23 18:28           ` [kernel-hardening] " 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=1506025307.5486.24.camel@redhat.com \
    --to=riel@redhat.com \
    --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=mingo@kernel.org \
    --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.