1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/source4/dns_server
Stefan Gohmann 666a5630ef s4-dns: dlz_bind9: Check result to avoid segfault
We saw this issue in a customer environment with many CNF objects. I
wasn't able to reproduce it, but I got the following core dump:

 (gdb) directory samba4-4.0.0~rc6/source4/dns_server/
 Source directories searched: /root/samba4-4.0.0~rc6/source4/dns_server:$cdir:$cwd
 (gdb) bt
 #0  0xb4b0bc13 in dlz_lookup_types (state=0x9648e48, zone=0xb659b9a8 "xxxxxx.xxxxx.de", name=0xb659bda8 "client9173", lookup=0xb6db7588, types=0x0) at ../source4/dns_server/dlz_bind9.c:830
 #1  0xb4b0bdb8 in dlz_lookup (zone=0xb659b9a8 "xxxxxx.xxxxx.de", name=0xb659bda8 "client9173", dbdata=0x9648e48, lookup=0xb6db7588) at ../source4/dns_server/dlz_bind9.c:875
 #2  0x080b43d8 in dlopen_dlz_lookup ()
 #3  0xb7701755 in findnode () from /usr/lib/libdns.so.81
 #4  0xb7701d22 in find () from /usr/lib/libdns.so.81
 #5  0xb7639e5f in dns_db_find () from /usr/lib/libdns.so.81
 #6  0x08075476 in query_find ()
 #7  0x0807acb9 in ns_query_start ()
 #8  0x08060712 in client_request ()
 #9  0xb743022b in run () from /usr/lib/libisc.so.81
 #10 0xb7216955 in start_thread () from /lib/i686/cmov/libpthread.so.0
 #11 0xb706c1de in clone () from /lib/i686/cmov/libc.so.6
 (gdb) f 0
 #0  0xb4b0bc13 in dlz_lookup_types (state=0x9648e48, zone=0xb659b9a8 "xxxxxx.xxxxx.de", name=0xb659bda8 "client9173", lookup=0xb6db7588, types=0x0) at ../source4/dns_server/dlz_bind9.c:830
 830             el = ldb_msg_find_element(res->msgs[0], "dnsRecord");
 (gdb) p res->msgs
 $1 = (struct ldb_message **) 0x0
 (gdb) p res->count
 $2 = 0
 (gdb)

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-03-09 06:30:21 +01:00
..
dlz_bind9.c s4-dns: dlz_bind9: Check result to avoid segfault 2013-03-09 06:30:21 +01:00
dlz_minimal.h dlz_bind9: Build shared libraries for both BIND versions 9.8 and 9.9 2012-04-16 11:16:34 +10:00
dns_crypto.c s4 dns: Make debug output less noisy 2012-09-07 00:31:56 +02:00
dns_query.c s4 dns: Make debug output less noisy 2012-09-07 00:31:56 +02:00
dns_server.c s4:dns_server: fix formatting difference compared to v4-0-test 2012-10-24 10:12:51 +02:00
dns_server.h s4 dns: Verify incoming TSIG signatures 2012-09-05 19:02:17 +02:00
dns_update.c s4:dns_server: remove wrong and unused dsdb_check_access_on_dn() check 2012-09-12 16:51:29 +02:00
dns_utils.c s4 dns: Fix return code for deleted records 2012-09-30 13:09:14 +02:00
TODO s4 dns: Add a boilerplate DNS server implementation 2010-10-23 10:17:05 +00:00
wscript_build selftest: Add tests for the dlz_bind9 module 2012-09-06 15:22:26 +10:00