MaraDNS crash on invalid configuration file

S.Geist shatgeist at googlemail.com
Tue Aug 25 07:35:21 EDT 2009


Hello,

I have a problem with maradns-1.3.07.09, it crashes on the attached
configuration files (where db.example.com is invalid).

In my case,

(gdb) list
725                     return 0;
726             }
727
728             ret = js_append_dname(o, stream, starwhitis);
729
730             if(o->unit_count > 1 && *(o->string + 1) == '.' &&
o->unit_count != 2){
731                     csv2_error(stream,"Dot can only be at
beginning of hostname"
732                                " for root ('.') hostname");
733                     return 0;
734             }

the crash is caused by line 730 where o->string is NULL.

(gdb) print o->string
$4 = (unsigned char *) 0x0

(gdb) bt
#0  0x0806e9a2 in process_dname (stream=0x9dfcef0, starwhitis=1) at
Csv2_parse.c:730
#1  0x0806efa7 in csv2_get_hostname (stream=0x9dfcef0,
zonename=0x9dfc8d0, starwhitis=1) at Csv2_parse.c:965
#2  0x08070378 in csv2_read_rr (state=0x9dfcea0, stream=0x9dfcef0,
starwhitis=0) at Csv2_parse.c:1594
#3  0x0806d868 in csv2_parse_zone (filename=0x9dfc038,
state=0x9dfcea0, starwhitis=0) at Csv2_main.c:618
#4  0x0806d76a in csv2_parse_zone_bighash (zone=0x9dfd5f8,
filename=0x9dfc038, bighash=0x9dfcb28, starwhitis=0) at
Csv2_main.c:581
#5  0x0806ca71 in csv2_parse_main_bighash (main_table=0x9dfcb28,
starwhitis=0) at Csv2_main.c:95
#6  0x08053b31 in populate_main (maintable=0x9dfcb28, error=0x9df6130,
recursive=0) at MaraBigHash.c:983
#7  0x08051671 in main (argc=3, argv=0xbfad32d4) at MaraDNS.c:4467

Can anybody confirm?


More information about the list mailing list