lkml.org 
[lkml]   [2007]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Lguest] [PATCH] lguest: Fix Malicious Guest GDT Host Crash
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-08-09 18:03    [W:0.059 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site