Bug 1076775 - bind-dyndb-ldap crashes when handling DNS64 query
Summary: bind-dyndb-ldap crashes when handling DNS64 query
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: bind-dyndb-ldap
Version: 19
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Spacek
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:9660416a741e7beebfc2903bafd...
: 1076261 (view as bug list)
Depends On:
Blocks: 1078295
TreeView+ depends on / blocked
 
Reported: 2014-03-15 01:56 UTC by William Brown
Modified: 2014-03-28 12:03 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1078295 (view as bug list)
Environment:
Last Closed: 2014-03-28 12:03:30 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (27.84 KB, text/plain)
2014-03-15 01:56 UTC, William Brown
no flags Details
File: cgroup (170 bytes, text/plain)
2014-03-15 01:56 UTC, William Brown
no flags Details
File: core_backtrace (12.22 KB, text/plain)
2014-03-15 01:56 UTC, William Brown
no flags Details
File: dso_list (4.58 KB, text/plain)
2014-03-15 01:56 UTC, William Brown
no flags Details
File: environ (145 bytes, text/plain)
2014-03-15 01:56 UTC, William Brown
no flags Details
File: limits (1.29 KB, text/plain)
2014-03-15 01:56 UTC, William Brown
no flags Details
File: maps (23.38 KB, text/plain)
2014-03-15 01:56 UTC, William Brown
no flags Details
File: open_fds (251 bytes, text/plain)
2014-03-15 01:56 UTC, William Brown
no flags Details
File: proc_pid_status (908 bytes, text/plain)
2014-03-15 01:56 UTC, William Brown
no flags Details
File: var_log_messages (9.31 KB, text/plain)
2014-03-15 01:56 UTC, William Brown
no flags Details
output from rpm -qa (24.54 KB, text/plain)
2014-03-18 23:04 UTC, William Brown
no flags Details

Description William Brown 2014-03-15 01:56:24 UTC
Description of problem:


Version-Release number of selected component:
bind-9.9.3-14.P2.fc19

Additional info:
reporter:       libreport-2.1.12
backtrace_rating: 4
cmdline:        /usr/sbin/named -u named
crash_function: assertion_failed
executable:     /usr/sbin/named
kernel:         3.13.5-101.fc19.x86_64
runlevel:       unknown
type:           CCpp
uid:            25

Truncated backtrace:
Thread no. 1 (8 frames)
 #2 assertion_failed at ./main.c:219
 #3 isc_assertion_failed at assertions.c:57
 #4 dns_db_detachnode at db.c:636
 #5 query_find at query.c:6507
 #6 ns_query_start at query.c:7790
 #7 client_request at client.c:1970
 #8 dispatch at task.c:1116
 #9 run at task.c:1286

Comment 1 William Brown 2014-03-15 01:56:30 UTC
Created attachment 874676 [details]
File: backtrace

Comment 2 William Brown 2014-03-15 01:56:32 UTC
Created attachment 874677 [details]
File: cgroup

Comment 3 William Brown 2014-03-15 01:56:34 UTC
Created attachment 874678 [details]
File: core_backtrace

Comment 4 William Brown 2014-03-15 01:56:36 UTC
Created attachment 874679 [details]
File: dso_list

Comment 5 William Brown 2014-03-15 01:56:38 UTC
Created attachment 874680 [details]
File: environ

Comment 6 William Brown 2014-03-15 01:56:40 UTC
Created attachment 874681 [details]
File: limits

Comment 7 William Brown 2014-03-15 01:56:43 UTC
Created attachment 874682 [details]
File: maps

Comment 8 William Brown 2014-03-15 01:56:45 UTC
Created attachment 874683 [details]
File: open_fds

Comment 9 William Brown 2014-03-15 01:56:47 UTC
Created attachment 874684 [details]
File: proc_pid_status

Comment 10 William Brown 2014-03-15 01:56:49 UTC
Created attachment 874685 [details]
File: var_log_messages

Comment 11 Petr Spacek 2014-03-18 12:03:01 UTC
*** Bug 1076261 has been marked as a duplicate of this bug. ***

Comment 12 Petr Spacek 2014-03-18 12:05:39 UTC
Do you know the DNS query which causes the crash?

Is there any chance to get the coredump file from you? (Please compress it as much as you can and attach it to this bug. I would recommend you to check "Make attachment and comment private".)

Also, output from command "rpm -qa" would be very appreciated. Thank you!

Comment 13 William Brown 2014-03-18 22:59:37 UTC
Any query that requests a hostname that does NOT return a AAAA from an ldap backed domain. IE for example.com, if a host such as foo.example.com has an A record, but no AAAA and you run:

dig foo.example.com AAAA

You will crash the named server.

Comment 14 William Brown 2014-03-18 23:04:19 UTC
Created attachment 876139 [details]
output from rpm -qa

Comment 15 Petr Spacek 2014-03-19 11:31:10 UTC
That is really weird, I'm pretty sure we haven't seen that in our tests :-)

Please attach full named.conf (not only an excerpt) to this bug. (Do not forget to redact passwords :-)

Could you export the DNS database from LDAP and attach it to this bug or send it to me privately, please?
You can use following command (when kinit'ed as IPA admin):
$ ldapsearch -Y GSSAPI -b 'cn=dns, dc=ipa, dc=test' > /tmp/dns.ldif

Comment 16 Petr Spacek 2014-03-19 14:33:37 UTC
I have reproduced the crash. You have DNS64 enabled, haven't you?

I added this snippet to my named.conf:
        dns64 ::ffff:0:0/96 {
            clients { any; };
            exclude { none; };
        };

And now it crashes if I do a DNS query for a name with A record but without AAAA record.

Comment 17 Petr Spacek 2014-03-19 15:02:42 UTC
Upstream ticket:
https://fedorahosted.org/bind-dyndb-ldap/ticket/132

Comment 18 Petr Spacek 2014-03-19 15:21:51 UTC
I have tested this configuration on Fedora 20 with bind-dyndb-ldap-4.1-1.fc20.x86_64 and it doesn't crash:

My recommendation is to temporarily disable DNS64 and then upgrade to Fedora 20 :-)

I can't promise that fix for Fedora 19 will be available soon because nobody considered DNS64 during original bind-dyndb-ldap design. (Version 4 was heavily refactored so some limitations from older version are not present anymore.)

# dig @127.0.0.1 vm.ipa.example.
; <<>> DiG 9.9.4-P2-RedHat-9.9.4-11.P2.fc20 <<>> @127.0.0.1 vm.ipa.example.
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28368
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;vm.ipa.example.			IN	A

;; ANSWER SECTION:
vm.ipa.example.		86400	IN	A	192.0.2.111

;; AUTHORITY SECTION:
ipa.example.		86400	IN	NS	vm.ipa.example.

;; Query time: 3 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: St bře 19 16:12:50 CET 2014
;; MSG SIZE  rcvd: 106

# @127.0.0.1 vm.ipa.example. -t AAAA
; <<>> DiG 9.9.4-P2-RedHat-9.9.4-11.P2.fc20 <<>> @127.0.0.1 vm.ipa.example. -t AAAA
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 32301
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;vm.ipa.example.			IN	AAAA

;; ANSWER SECTION:
vm.ipa.example.		3600	IN	AAAA	::ffff:192.0.2.111

;; AUTHORITY SECTION:
ipa.example.		86400	IN	NS	vm.ipa.example.

;; Query time: 2 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: St bře 19 16:12:53 CET 2014
;; MSG SIZE  rcvd: 118

# dig @127.0.0.1 vm.ipa.example. -t ANY
; <<>> DiG 9.9.4-P2-RedHat-9.9.4-11.P2.fc20 <<>> @127.0.0.1 vm.ipa.example. -t ANY
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29670
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;vm.ipa.example.			IN	ANY

;; ANSWER SECTION:
vm.ipa.example.		86400	IN	A	192.0.2.111

;; AUTHORITY SECTION:
ipa.example.		86400	IN	NS	vm.ipa.example.

Comment 19 William Brown 2014-03-20 00:38:04 UTC
Yes, I am running this with dns64

I will follow your instructions as asked, and will remove dns64 and upgrade my systems to f20. This will take me a bit to work out of course, given backups, and such to ensure a smooth upgrade. 

I will report back soon about this.

Comment 20 Martin Kosek 2014-03-20 07:44:55 UTC
Thanks. I think it would be then useful to test if dns64 indeed works with the Fedora 20 version of bind-dyndb-ldap - it should, AFAIU.

Comment 21 Petr Spacek 2014-03-20 13:25:14 UTC
(In reply to Martin Kosek from comment #20)
> Thanks. I think it would be then useful to test if dns64 indeed works with
> the Fedora 20 version of bind-dyndb-ldap - it should, AFAIU.
Please see comment 18 :-)

Comment 22 Martin Kosek 2014-03-20 14:27:25 UTC
I read it, this is why I did Comment 20 - to encourage William to not disable dns64 permanently.

Comment 23 Petr Spacek 2014-03-20 14:39:13 UTC
(In reply to Martin Kosek from comment #22)
Ah okay, I thought that your message was intended to me :-)

Comment 24 William Brown 2014-03-23 22:21:12 UTC
I have upgraded to f20, reconfigured dns64 to run and observed. Everything seems to be more stable now, with no crashes since.

Thanks for the advice on this matter. Perhaps it should be listed that f19 is not recommended for ipa due to the older bind-dyndb version? Which version of bind-dyndb is going into rhel7?

Comment 25 Petr Spacek 2014-03-24 11:22:29 UTC
(In reply to William Brown from comment #24)
> I have upgraded to f20, reconfigured dns64 to run and observed. Everything
> seems to be more stable now, with no crashes since.
I will try to fix it in bind-dyndb-ldap 3.x when I have time for doing it.

> Thanks for the advice on this matter. Perhaps it should be listed that f19
> is not recommended for ipa due to the older bind-dyndb version?
Personally, I wouldn't use so strong words :-) I guess that bind-dyndb-ldap 3.x works most deployments. Please consider that you are the first one who ever tried DNS64 with IPA and reported a bug about it.

> Which version of bind-dyndb is going into rhel7?
Relevant RHEL 7 bug is https://bugzilla.redhat.com/show_bug.cgi?id=1078295.

Comment 26 William Brown 2014-03-24 23:40:11 UTC
(In reply to Petr Spacek from comment #25)
> (In reply to William Brown from comment #24)
> > I have upgraded to f20, reconfigured dns64 to run and observed. Everything
> > seems to be more stable now, with no crashes since.
> I will try to fix it in bind-dyndb-ldap 3.x when I have time for doing it.
> 

Thanks for that. 

> > Thanks for the advice on this matter. Perhaps it should be listed that f19
> > is not recommended for ipa due to the older bind-dyndb version?
> Personally, I wouldn't use so strong words :-) I guess that bind-dyndb-ldap
> 3.x works most deployments. Please consider that you are the first one who
> ever tried DNS64 with IPA and reported a bug about it.
> 

Well there you go: Pushing boundaries ;)

> > Which version of bind-dyndb is going into rhel7?
> Relevant RHEL 7 bug is https://bugzilla.redhat.com/show_bug.cgi?id=1078295.

Excellent! Thanks again for your help.

Comment 27 Fedora Admin XMLRPC Client 2014-03-26 10:55:40 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 28 Martin Kosek 2014-03-28 12:03:30 UTC
We discussed this Bugzilla in the team and do not plan to fix the Fedora 19 version, given that this feature is obviously not very used and we have a fix on next version of Fedora (cannot be backported, it is caused by using different internal storage).

Closing as NEXTRELEASE.


Note You need to log in before you can comment on or make changes to this bug.