* [PATCH] proper bounds check in do_set_gdt entry point
@ 2005-06-27 18:41 Chris Wright
2005-06-27 19:21 ` Keir Fraser
0 siblings, 1 reply; 4+ messages in thread
From: Chris Wright @ 2005-06-27 18:41 UTC (permalink / raw)
To: xen-devel
Unless I missed something, not bounds checking entries in do_set_gdt is
a security hole.
Signed-off-by: Chris Wright <chrisw@osdl.org>
--- 1.184/xen/arch/x86/mm.c 2005-06-23 02:35:56 -07:00
+++ edited/xen/arch/x86/mm.c 2005-06-27 11:37:30 -07:00
@@ -2442,6 +2442,9 @@ long do_set_gdt(unsigned long *frame_lis
unsigned long frames[16];
long ret;
+ if ( entries > FIRST_RESERVED_GDT_ENTRY )
+ return -EINVAL;
+
if ( copy_from_user(frames, frame_list, nr_pages * sizeof(unsigned long)) )
return -EFAULT;
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] proper bounds check in do_set_gdt entry point
2005-06-27 18:41 [PATCH] proper bounds check in do_set_gdt entry point Chris Wright
@ 2005-06-27 19:21 ` Keir Fraser
2005-06-27 20:00 ` Chris Wright
0 siblings, 1 reply; 4+ messages in thread
From: Keir Fraser @ 2005-06-27 19:21 UTC (permalink / raw)
To: Chris Wright; +Cc: xen-devel
On 27 Jun 2005, at 19:41, Chris Wright wrote:
> Unless I missed something, not bounds checking entries in do_set_gdt is
> a security hole.
>
> Signed-off-by: Chris Wright <chrisw@osdl.org>
The check happens in set_gdt(). do_set_gdt is just a wrapper with a
copy_from_user plus conditional tlb flush.
-- Keir
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] proper bounds check in do_set_gdt entry point
2005-06-27 19:21 ` Keir Fraser
@ 2005-06-27 20:00 ` Chris Wright
2005-06-27 20:09 ` Keir Fraser
0 siblings, 1 reply; 4+ messages in thread
From: Chris Wright @ 2005-06-27 20:00 UTC (permalink / raw)
To: Keir Fraser; +Cc: Chris Wright, xen-devel
* Keir Fraser (Keir.Fraser@cl.cam.ac.uk) wrote:
>
> On 27 Jun 2005, at 19:41, Chris Wright wrote:
>
> >Unless I missed something, not bounds checking entries in do_set_gdt is
> >a security hole.
> >
> >Signed-off-by: Chris Wright <chrisw@osdl.org>
>
> The check happens in set_gdt(). do_set_gdt is just a wrapper with a
> copy_from_user plus conditional tlb flush.
I know, but copy_from_user has no sane limits. This is stack smash.
-chris
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-06-27 20:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-27 18:41 [PATCH] proper bounds check in do_set_gdt entry point Chris Wright
2005-06-27 19:21 ` Keir Fraser
2005-06-27 20:00 ` Chris Wright
2005-06-27 20:09 ` Keir Fraser
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.