[rrd-developers] Bug#663505: rrdcached segfaults - not checked realpath and strdup

Sebastian Harl tokkee at debian.org
Mon Mar 12 09:58:45 CET 2012

forwarded 663505 rrd-developers at lists.oetiker.ch


forwarding to the RRDtool developers mailing list. Summary for the
reference: RRDCacheD segfaults at startup if the journal directory does
not exist.

See <http://bugs.debian.org/663505> for details.

On Mon, Mar 12, 2012 at 04:03:18AM +0100, Witold Baryluk wrote:
> problem is in incorrect error handling.
> Attached patch adds realpath and strdup error handling for journal dir
> option.

Thanks for reporting this and providing a patch!

A similar fix has already been applied to upstream SVN, see r2153. Tobi,
could that patch be merged to 1.4 as well?

> Why journal dir was not created in first place, is different story
> (probably bug in postinst script)

In fact, the postinst script does not take care of that at all. Imho,
RRDCacheD should do that (and did it, in the past iirc).

Imho, realpath() should in fact be called after rrd_mkdir_p(). I don't
think there is a need for having an absolute / canonicalized pathname
when creating the directory.



Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.oetiker.ch/pipermail/rrd-developers/attachments/20120312/749fe13e/attachment.pgp 

More information about the rrd-developers mailing list