This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch]: heap_chunk_size



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]