[nsd-users] nsd segfaults when serving a TXT record with two strings

Stephane Bortzmeyer bortzmeyer at nic.fr
Mon Jul 4 15:30:07 UTC 2011

On Mon, Jul 04, 2011 at 05:15:12PM +0200,
 Stephane Bortzmeyer <bortzmeyer at nic.fr> wrote 
 a message of 15 lines which said:

> crashes nsd when queried with QTYPE=TXT or ANY:

And the trace seems to be:

Program received signal SIGSEGV, Segmentation fault.
0x0805c7e5 in query_get_dname_offset (query=0x9176c90, domain=0x9174bb4)
    at query.h:143
143             return query->compressed_dname_offsets[domain->number];
(gdb) where
#0  0x0805c7e5 in query_get_dname_offset (query=0x9176c90, domain=0x9174bb4)
    at query.h:143
#1  0x0805c8d0 in encode_dname (q=0x9176c90, domain=0x9174bb4) at packet.c:21
#2  0x0805ca46 in packet_encode_rr (q=0x9176c90, owner=0x91708dc, rr=0x9174b54)
    at packet.c:76
#3  0x0805cc09 in packet_encode_rrset (query=0x9176c90, owner=0x91708dc, 
    rrset=0x9174b44, section=1) at packet.c:126
#4  0x0804a299 in encode_answer (q=0x9176c90, answer=0xbfbe71fc) at answer.c:76
#5  0x0805ffbe in answer_query (nsd=0x807f3e0, q=0x9176c90) at query.c:1204
#6  0x080605a6 in query_process (q=0x9176c90, nsd=0x807f3e0) at query.c:1353
#7  0x0806645a in server_process_query (nsd=0x807f3e0, query=0x9176c90)
    at server.c:1211
#8  0x08066ab5 in handle_udp (netio=0x9175c88, handler=0x9175d10, 
    event_types=NETIO_EVENT_READ) at server.c:1408
#9  0x08058806 in netio_dispatch (netio=0x9175c88, timeout=0x0, sigmask=0x0)
    at netio.c:258
#10 0x08066875 in server_child (nsd=0x807f3e0) at server.c:1343
#11 0x08064506 in restart_child_servers (nsd=0x807f3e0, region=0x9170530, 
    netio=0x9174c80, xfrd_sock_p=0xbfc055c8) at server.c:292
#12 0x08064e9a in server_start_children (nsd=0x807f3e0, region=0x9170530, 
    netio=0x9174c80, xfrd_sock_p=0xbfc055c8) at server.c:567
#13 0x08065caa in server_main (nsd=0x807f3e0) at server.c:977
#14 0x0805ad33 in main (argc=0, argv=0xbfc05924) at nsd.c:1063

(gdb) print domain->number
$4 = 1852383333

More information about the nsd-users mailing list