bug in debug.c

Simo Sorce simo.sorce at xsec.it
Sun Sep 1 06:57:00 GMT 2002


Fixed, can you test?

Thank you very much.

On Sun, 2002-09-01 at 00:00, Kai Krueger wrote:
> Hi
> 
> There seems to be a bug in debug.c. It causes samba to crash with SIGSEGV on
> startup if a unknown debug class is specified in smb.conf.
> The problem is in debug_parse_params(). This function gets a pointer to the
> debug classes as parameter instead of useing the global DEBUGLEVEL_CLASS
> arrays. In most cases this doesn't make a difference, but if the arrays
> change while still in the function it causes a segmentation fault. Now this
> is exactly what happens if you specify an unknown debug class.
> debug_parse_params() looks for the debug class with
> debug_lookup_classname(). If debug_lookup_classname() doesn't find the class
> and debug_auto_add_unknown_class is true, the debug class is added. This
> causes the DEBUGLEVEL_CLASS to be reallocated and the next time
> debug_parse_params() tries to access it with its local point (still pointing
> to the old DEBUGLEVEL_CLASS) it crashes as it accesses it out of bounds.
> 
> What is the best solution to this problem. Can debug_parse_params() just use
> the global version?
> 
> Kai
-- 
Simo Sorce - simo.sorce at xsec.it
Xsec s.r.l.
via Durando 10 Ed. G - 20158 - Milano
tel. +39 02 2399 7130 - fax: +39 02 700 442 399
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20020901/21dfde4e/attachment.bin


More information about the samba-technical mailing list