All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Andy Lutomirski <luto@amacapital.net>,
	Thomas Gleixner <tglx@linutronix.de>, X86 ML <x86@kernel.org>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Sebastian Lackner <sebastian@fds-team.de>,
	Anish Bhatt <anish@chelsio.com>,
	linux-kernel@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: Chuck Ebbert <cebbert.lkml@gmail.com>,
	Andy Lutomirski <luto@amacapital.net>,
	stable@vger.kernel.org
Subject: Re: [PATCH] x86_64, entry: Fix out of bounds read on sysenter
Date: Sat, 01 Nov 2014 12:58:55 +1030	[thread overview]
Message-ID: <874muj4pso.fsf@rustcorp.com.au> (raw)
In-Reply-To: <a27467328f7607b4f45a6c37e731c1f3e047f4a7.1414803784.git.luto@amacapital.net>

Andy Lutomirski <luto@amacapital.net> writes:
> Rusty noticed a Really Bad Bug (tm) in my NT fix.  The entry code
> reads out of bounds, causing the NT fix to be unreliable.  But, and
> this is much, much worse, if your stack is somehow just below the
> top of the direct map (or a hole), you read out of bounds and crash.
>
> Excerpt from the crash:
>
> [    1.129513] RSP: 0018:ffff88001da4bf88  EFLAGS: 00010296
>
>   2b:*    f7 84 24 90 00 00 00     testl  $0x4000,0x90(%rsp)
>
> That read is deterministically above the top of the stack.  I
> thought I even single-stepped through this code when I wrote it to
> check the offset, but I clearly screwed it up.
>
> Fixes 8c7aa698baca x86_64, entry: Filter RFLAGS.NT on entry from userspace
>
> Reported-by: Rusty Russell <rusty@ozlabs.org>
> Cc: stable@vger.kernel.org
> Signed-off-by: Andy Lutomirski <luto@amacapital.net>

Tested-by: Rusty Russell <rusty@rustcorp.com.au>

Thanks for the fast response...
Rusty.

      reply	other threads:[~2014-11-01  2:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-01 18:49 [PATCH v4 0/2] x86_64,entry: Clear NT on entry and speed up switch_to Andy Lutomirski
2014-10-01 18:49 ` [PATCH v4 1/2] x86_64,entry: Filter RFLAGS.NT on entry from userspace Andy Lutomirski
2014-10-01 19:49   ` Andy Lutomirski
2014-10-02 15:36     ` H. Peter Anvin
2014-10-06 16:42     ` H. Peter Anvin
2014-10-06 18:07   ` [tip:x86/urgent] x86_64, entry: " tip-bot for Andy Lutomirski
2014-10-01 18:49 ` [PATCH v4 2/2] x86_64: Don't save flags on context switch Andy Lutomirski
2014-10-06 16:39 ` [PATCH v4 0/2] x86_64,entry: Clear NT on entry and speed up switch_to Andy Lutomirski
2014-10-06 16:41   ` H. Peter Anvin
2014-10-06 16:45     ` Andy Lutomirski
2014-10-06 16:57       ` H. Peter Anvin
2014-11-01  0:20 ` Rusty Russell
2014-11-01  1:00   ` Andy Lutomirski
2014-11-01  1:08     ` [PATCH] x86_64, entry: Fix out of bounds read on sysenter Andy Lutomirski
2014-11-01  2:28       ` Rusty Russell [this message]

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=874muj4pso.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=anish@chelsio.com \
    --cc=cebbert.lkml@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mingo@redhat.com \
    --cc=sebastian@fds-team.de \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    /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.