Exim buffer overruns [was Re: Hoo boy...]

Top Page
Delete this message
Reply to this message
Author: Nigel Metheringham
Date:  
To: Lee McLoughlin
CC: Philip Hazel, Pete Ashdown, Exim Mailing List
Old-Topics: Re: Hoo boy...
Subject: Exim buffer overruns [was Re: Hoo boy...]
We really need some volunteers to start looking carefully at the code for
this sort of problem, and probably to change some coding practices to
ensure it doesn't easily happen again.

I like Lee's solution for making the buffer a dynamic string, *but* that
then means we have to spend time cleaning up after ourselves - or just
leak memory. Actually if we keep using processes up then we can just let
the storage lifetime be that of the process and let the OS clean up after
us.

Personally I'd like to make all the internal string use within exim
dynamic - something that smail actually did pretty well. However that
incurs penalties - performancewise (which can probably be ignored) and
extra work in keeping the bookkeeping straight. Maybe we can borrow the
apache memory pools technique and alloc from an appropriate pool,
destroying the whole pool at the end of a particular phase (errors in
memory lifetime though would have subtle and unpredictable effects).

I guess good ideas on this would be gratefully received!

    Nigel.


-- 
[ Nigel.Metheringham@???   -  Systems Software Engineer ]
[ Tel : +44 113 251 6012                   Fax : +44 113 224 0003 ]
[            Friends don't let friends use sendmail!              ]