Re: [PATCH] Vtable pointer verification, gcc changes (patch 2 of 2)

2012-11-29 Thread Jason Merrill
On 11/16/2012 01:21 PM, Caroline Tice wrote: -start_objects (int method_type, int initp) +start_objects (int method_type, int initp, const char *extra_name) I don't think we want to mess with start_objects and such here. Can't you just use DECL_STATIC_CONSTRUCTOR (decl) = 1; SET

Re: Fwd: [PATCH] Vtable pointer verification, gcc changes (patch 2 of 2)

2012-11-28 Thread Diego Novillo
On 2012-11-16 13:24 , Caroline Tice wrote: Index: gcc/cp/decl2.c === --- gcc/cp/decl2.c (revision 193571) +++ gcc/cp/decl2.c (working copy) @@ -69,8 +69,8 @@ typedef struct priority_info_s { static void mark_vtable_entrie

Re: [PATCH] Vtable pointer verification, gcc changes (patch 2 of 2)

2012-11-08 Thread Caroline Tice
Most likely use-after-free issues, but any memory use bug lays the program open to these attacks. -- Caroline Tice cmt...@google.com On Thu, Nov 8, 2012 at 1:36 AM, Florian Weimer wrote: > On 11/05/2012 06:48 PM, Caroline Tice wrote: > >> As requested, I have split the original patch into two p

Re: [PATCH] Vtable pointer verification, gcc changes (patch 2 of 2)

2012-11-08 Thread Florian Weimer
On 11/05/2012 06:48 PM, Caroline Tice wrote: As requested, I have split the original patch into two parts: GCC changes and runtime library changes. The attached patch is fore the gcc changes. Out of curiosity, what's the primary source of wrong vtable values you expect? User-after-free issu

Re: [PATCH] Vtable pointer verification, gcc changes (patch 2 of 2)

2012-11-07 Thread Xinliang David Li
See some random comments below. Some test cases should also be added. It should be easy to fake the attack by using placement new with incompatible type .. David > /* Start the process of running a particular set of global constructors > or destructors. Subroutine of do_[cd]tors. */ > >