Vulnerability Development mailing list archives

Re: stackguard-like embedded protection


From: antirez <antirez () linuxcare com>
Date: Wed, 13 Sep 2000 11:29:31 +0200

On Mon, Sep 11, 2000 at 11:34:01AM +0900, Hiroaki Etoh wrote:
I don't think this solution is portable to any C compiler.  Because the ordering
of local variables is very dependent of the implementation of compilers, for
example, Visual C++ by Microsoft.  I don't know the current version of GCC
compiler preserves the ordering of local variables. Therefore, I implemented
ProPolice at the intermediate language level.

I tested GCC i386 and sparc with a lot of optimizations and options:
it seems that if the variable is declared with the specifier 'volatile'
always goes next to the RET. I have no access to other compilers,
but since implementing ProPolice at the intermediate language level
you needs to implement it for all the compilers it seems that my
solution can be more portable in some case. For example it can work
in new compilers without changes, ProPolice can't.
Also ProPolice needs to be implemented in a different way for different
compilers: you can add #ifdefs to my header file to make it compatible
with strange-behaviour compilers.

regards,
antirez

--
Salvatore Sanfilippo, Open Source Developer, Linuxcare Italia spa
+39.049.80 43 411 tel, +39.049.80 43 412 fax
antirez () linuxcare com, http://www.linuxcare.com/
Linuxcare. Support for the revolution.


Current thread: