Ethereal-dev: Re: [Ethereal-dev] Canary checking added to emem.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Tue, 10 Jan 2006 11:26:32 +0100
Jaap Keuter wrote:

It's a trick to put a specific value (the canary) at the top of the stack
frame or end of allocated buffer. When the stack frame of buffer is
released, the canary should still be there. If not the code has reached
too far up the stack or into the buffer, indicating an error.

Check this paper on stackguard:
http://gcc.fyxm.net/summit/2003/Stackguard.pdf
Ah, thanks for the explanation.

I know this technique as adding a "gap" or "no mans land", never heard canary before :-)

Regards, ULFL