We had a syntax error in our inverse zone file using GENERATE and extra dash were added to the scope so '199--222' instead of '199-222':<br><br>$GENERATE 199--222 $ PTR 10-100-60-$.<a href="http://dhcp-bl.indiana.edu">dhcp-bl.indiana.edu</a>.<br>
<br>I would assume named will check the syntax error and refuse to load this zone just like it normally does, but instead it tries to generate millions of<br>erroneous entry because it scanned '-222' to the stop which created a huge number for the named to loop through and the CPU at 100% and locked up 15 of our nameservers, some of those need power recycle to respond to console.<br>
<br>This is the first bug of that type we have seen, it's my 12th year of running BIND for large site, another team member has nearly 20 years experience<br>with BIND and we're surprised named doesn't catch the syntax error.<br>
<br>Should a syntax error in inverse zone file cause named to locking up the machine?<br><br>But there is checking in forward file and same syntax error were caught:<br><br>Aug 16 19:09:19 named named[4169]: 16-Aug-2011 19:09:19.609 general: error: dns_rdata_fromtext: buffer-0x42200470 : near '10.100.60.256': bad dotted quad<br>
Aug 16 20:00:02 named named[4169]: 16-Aug-2011 22:00:02.649 general: error: $GENERATE: Domain/<a href="http://test.example.edu:1496">test.example.edu:1496</a>: bad dotted quad<br>Aug 16 20:00:02 named named[4169]: 16-Aug-2011 22:00:02.649 general: error: zone <a href="http://test.example.edu/IN">test.example.edu/IN</a>: loading from master file Domain/<a href="http://test.example.edu">test.example.edu</a> failed: bad dotted quad<br>
<br><br>Here is some test code we copied from master.c<br><br>#include<stdio.h><br><br>main()<br>{ <br>   int n;<br>        unsigned int start, stop, step;<br><br>        n = sscanf("199--222", "%u-%u/%u", &start, &stop, &step);<br>
<br>        printf("Start of generated range: %u\n", start);<br>        printf("End of generated range: %u\n", stop);<br><br>}<br><br>Output:<br><br>Start of generated range: 199<br>End of generated range: 4294967074<br>
<br>As you might expect, this is followed later by a loop:<br>for (i = start; i <= stop; i += step) {<br><br><br>Thanks,<br>Sue<br>