Mantis Bugtracker

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000065 [MyDNS-NG] Global crash always 2011-03-08 14:40 2011-03-08 14:40
Reporter nottledim View Status public  
Assigned To
Priority normal Resolution open Platform
Status new   OS
Projection none   OS Version
ETA none Fixed in Version Product Version pre-1.2.8.4
  Target Version Product Build
Summary 0000065: Segv when updating reverse zones
Description MyDNS version: 1.2.8.31

when isc-dhcpd tries to add/delete reverse maps it causes mysns to segfault.

dhcpd reports e.g: unable to add reverse map from
112.1.168.192.in-addr.arpa. to ipod.lingbrae: timed out

mydns[9731]: segfault at 0 ip b75117fe sp bff5cb9c error 6 in
libc-2.11.2.so[b749e000+140000]
Steps To Reproduce
Additional Information Problem has been traced to approx line 1131 in update.c. The strncpy id failing.

       /* Add this stuff to the new tmprr */
       q->tmprr[q->num_tmprr] = ALLOCATE(sizeof(TMPRR), TMPRR);
       strncpy((char*)TMPRR_NAME(q->tmprr[q->num_tmprr]),
(char*)UQRR_NAME(rr),
               sizeof(TMPRR_NAME(q->tmprr[q->num_tmprr])) - 1);
       q->tmprr[q->num_tmprr]->type = rr->type;

This is due to dest bufr (char*)TMPRR_NAME(q->tmprr[q->num_tmprr]) returning NULL pointer. There appears to be no buffer allocated for this string.

The attached patch offers a partial fix. It is not complete as a buffer is allocated but not freed.
Tags No tags attached.
Attached Files ? file icon mydns.patch [^] (1,055 bytes) 2011-03-08 14:40

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2011-03-08 14:40 nottledim New Issue
2011-03-08 14:40 nottledim File Added: mydns.patch


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker