[Patch]: heap_chunk_size

Pierre A. Humblet pierre@phumblet.no-ip.org
Tue Feb 3 17:26:00 GMT 2004



Christopher Faylor wrote:
> 
> On Mon, Feb 02, 2004 at 08:22:01PM -0500, Pierre A. Humblet wrote:
> >Here is a no brainer patch that eliminates the use of "heap_chunk" in
> >the cygwin shared.  That removes a source of DOS attack and it's
> >another step towards the demise of the cygwin shared.
> 
> This isn't a no-brainer.  This value is stored in the shared memory to
> avoid the runtime cost of registry lookups by every cygwin program.

A process only reads the registry when (!cygheap->user_heap.base),
i.e. when it starts from Windows. Previously it read the registry when it
was the first Cygwin process on the machine. There is a penalty, but it's 
small.
The chunk size could also be stored in the user shared (and read if it's
not in the cygheap). Actually that would be an even simpler patch, 
giving the same security. I'll send it tonight.

Pierre



More information about the Cygwin-patches mailing list