[Opendnssec-develop] [OpenDNSSEC] #197: Double-free issue

OpenDNSSEC owner-dnssec-trac at kirei.se
Mon Nov 22 23:43:44 UTC 2010


#197: Double-free issue
-----------------------------------------------------+----------------------
Reporter:  Sebastian Castro <sebastian@…>            |       Owner:  rb                           
    Type:  defect                                    |      Status:  new                          
Priority:  minor                                     |   Component:  Unknown                      
 Version:  trunk                                     |    Keywords:  double free memory allocation
-----------------------------------------------------+----------------------
 While working on a PoC code to display the list of keys available (in
 GENERATE state) for a zone, I found a double-free issue.

 The case was produced when a query to the KASP returned no rows. In the
 attached code, within the ListAvailableKeys function, if no rows are
 returned there is no call to DbString(row, 0, &key_id), meaning no mem
 allocation for key_id. Later on, you try to free that memory using
 DbStringFree. The glibc on Debian complains about this. I'm not completely
 sure about the right approach for fixing this.

-- 
Ticket URL: <http://trac.opendnssec.org/ticket/197>
OpenDNSSEC <http://www.opendnssec.org/>
OpenDNSSEC


More information about the Opendnssec-develop mailing list