public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Zachary Amsden <zach@vmware.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	lguest <lguest@ozlabs.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [Lguest] [PATCH] lguest: Fix Malicious Guest GDT Host Crash
Date: Thu, 09 Aug 2007 08:45:22 -0700	[thread overview]
Message-ID: <46BB3692.5010003@vmware.com> (raw)
In-Reply-To: <1186657033.17752.58.camel@localhost.localdomain>

Rusty Russell wrote:
> If a Guest makes hypercall which sets a GDT entry to not present, we
> currently set any segment registers using that GDT entry to 0.
> Unfortunately, this is not sufficient: there are other ways of
> altering GDT entries which will cause a fault.
>
> The correct solution to do what Linux does: let them set any GDT value
> they want and handle the #GP when popping causes a fault.  This has
> the added benefit of making our Switcher slightly more robust in the
> case of any other bugs which cause it to fault.
>
> We kill the Guest if it causes a fault in the Switcher: it's the
> Guest's responsibility to make sure it's not using segments when it
> changes them.
>   

Linux doesn't obey that rule.  It changes descriptors behind FS/GS all 
over the place.  Well, not all over the place, only when updating LDT 
entries, TLS entries, and during context switch.  This means lguest 
handling interrupts in one of those regions can result in the guest dying.

Zach

  reply	other threads:[~2007-08-09 16:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-09 10:57 [PATCH] lguest: Fix Malicious Guest GDT Host Crash Rusty Russell
2007-08-09 15:45 ` Zachary Amsden [this message]
2007-08-10 12:04   ` [Lguest] " Rusty Russell

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=46BB3692.5010003@vmware.com \
    --to=zach@vmware.com \
    --cc=akpm@linux-foundation.org \
    --cc=lguest@ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox