Re: OS stopping stack buffer overflow exploits

From: Peter T. Breuer (ptb@it.uc3m.es)
Date: Sun Jun 04 2000 - 07:56:15 EST


"A month of sundays ago Florian Weimer wrote:"
> "Peter T. Breuer" <ptb@it.uc3m.es> writes:
> > "A month of sundays ago Florian Weimer wrote:"
> > > The C and C++ frontends only generate trampolines if you use a GNU
> > > extension (nested functions).
> > And I have no idea why they should want to: nesting is purely a
> > question of namespaces and syntactic scoping. It should impact
> > the implementation semantics not at all.
> Yes, that's right. That's why we need trampolines: otherwise, pointers
> to nested functions would have semantics differing from ordinary function
> pointers.

Why so? When we do the call the return address gets pushed and we jump
to the pointer. From then on the (nested) function execution is
standard. It references locations in its frame on the stack for its
local variables, and locations higher up the stack for the enclosing
functions variables. The nested function isn't visible from anywhere
else so the enclosing functions frame must be above it on the stack
and the compiler can generate the right relative offsets for them.
Where does a trampoline come into it?

Peter

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jun 07 2000 - 21:00:18 EST