Re: OS stopping stack buffer overflow exploits

From: Jesse Pollard (pollard@cats-chateau.net)
Date: Sun Jun 04 2000 - 20:26:25 EST


On Sun, 04 Jun 2000, Horst von Brand wrote:
>"Peter T. Breuer" <ptb@it.uc3m.es> said:
>
>[...]
>
>> Nesting functions is a syntactic problem, not an implementation
>> problem.
>
>Think about calling a nested function from somewhere outside it's "home",
>it'll have to carry its definition environment around somehow. And this
>"somehow" isn't given with plain C function pointers which just point at
>the code to run. To set the stack up properly for such a function (with the
>right parent) requires a code snippet that becomes the target of the
>function pointer, and after building the environment calls the original
>code, and then cleans up. Note that this code has to depend on the exact
>invocation that created the function pointer (as it provides the definition
>environment), so the snippet isn't constant; and there might even be
>several of those active for the same nested function for different
>invocations of the parent at a given point in time. Thus, put it on the
>stack, i.e., a trampoline.
>

Naa -- its' called a closure. A standard operation that is normally optimized
to not need the stack. It works much faster that way.

-- 
-------------------------------------------------------------------------
Jesse I Pollard, II
Email: pollard@cats-chateau.net

Any opinions expressed are solely my own.

- 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:20 EST