[ldns-users] qualifying a dns packet before processing

Edward Fjellskål edwardfjellskaal at gmail.com
Sun Mar 18 09:07:43 UTC 2012


Hi again list :)

So, I parse dns packets, and today I use ldns_wire2pkt to determine
if I should go on or not, like:

-----8<-----
status = ldns_wire2pkt(&decoded_dns,payload, payload_length);

if (status != LDNS_STATUS_OK) {
    debug_log("[D] ldns_wire2pkt status = %d\n", status);
    return;
}
-----8<-----

But some packets processed give me:

*** stack smashing detected ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x50)[0x2622d0]
/lib/tls/i686/cmov/libc.so.6(+0xe227a)[0x26227a]
/usr/lib/libldns.so.1(+0x37204)[0xf16204]
/usr/lib/libldns.so.1(ldns_wire2dname+0x253)[0xef5b23]
/usr/lib/libldns.so.1(ldns_wire2rr+0x49)[0xef5db9]
/usr/lib/libldns.so.1(ldns_wire2pkt+0x239)[0xef6119]


Are there any other good way to do pre-qualifying of incoming data,
so it might make popping my stack a bit harder with lib ldns ?

great lib btw :)

E



More information about the ldns-users mailing list