crash on reconfig with duplicated zone name in zone catalog vs. named.conf
Summary
Run-time addition of zone into named.conf causes crash if the same zone is present in a catalog zone.
BIND version used
- Affects v9.16: v9_16_34
- Affects v9.18: 2f808b76
- Affects v9.19: f6f52513
Steps to reproduce
- Define zone in a catalog, e.g. catalog.db empty.db
- Start primary with this config: primary.conf
- Configure secondary with catalog: named.conf
- Start secondary
- On the secondary, uncomment duplicate zone definition as non-catalog secondary zone (I did not try other types)
- On the secondary, run
rndc reconfig
What is the current bug behavior?
zt.c:166: REQUIRE((__builtin_expect(!!((zt) != ((void *)0)), 1) && __builtin_expect(!!(((const isc__magic_t *)(zt))->magic == ((('Z') << 24 | ('T') << 16 | ('b') << 8 | ('l')))), 1))) failed, back trace
(gdb) bt
#0 0x00007f808410b8ec in ?? () from /usr/lib/libc.so.6
#1 0x00007f80840bcea8 in raise () from /usr/lib/libc.so.6
#2 0x00007f80840a653d in abort () from /usr/lib/libc.so.6
#3 0x0000556161c1bc0a in assertion_failed[cold] ()
#4 0x0000556161e2c7da in isc_assertion_failed ()
#5 0x0000556161df047a in dns_zt_find ()
#6 0x0000556161ca48bf in dns_catz_zones_merge ()
#7 0x0000556161ca8783 in dns_catz_update_from_db ()
#8 0x0000556161ca8938 in dns_catz_update_taskaction ()
#9 0x0000556161e5cc81 in isc_task_run ()
#10 0x0000556161e4666e in process_netievent ()
#11 0x0000556161e46898 in process_queue ()
#12 0x0000556161e47233 in async_cb ()
#13 0x00007f8084278363 in uv__async_io (loop=0x5561622a1400,
w=<optimized out>, events=<optimized out>) at src/unix/async.c:163
#14 0x00007f808428ac23 in uv__io_poll (loop=loop@entry=0x5561622a1400,
timeout=-1) at src/unix/epoll.c:374
#15 0x00007f8084278d47 in uv_run (loop=0x5561622a1400, mode=UV_RUN_DEFAULT)
at src/unix/core.c:406
#16 0x0000556161e46b39 in nm_thread ()
#17 0x0000556161e5efd5 in isc.trampoline_run ()
What is the expected correct behavior?
Good question. I'm not sure which zone definition should win, but at least it should not crash.