BIND issueshttps://gitlab.isc.org/isc-projects/bind9/-/issues2021-06-02T22:39:47Zhttps://gitlab.isc.org/isc-projects/bind9/-/issues/2724statschannel system test sometimes hangs2021-06-02T22:39:47ZMichal Nowakstatschannel system test sometimes hangsThe `statschannel` sometimes hungs and the system test CI job is terminated by CI's 1 hour timeout, see a job on [`main`](https://gitlab.isc.org/isc-projects/bind9/-/jobs/1749344/raw) (Debian Buster)
```
S:statschannel:2021-05-26T04:40:0...The `statschannel` sometimes hungs and the system test CI job is terminated by CI's 1 hour timeout, see a job on [`main`](https://gitlab.isc.org/isc-projects/bind9/-/jobs/1749344/raw) (Debian Buster)
```
S:statschannel:2021-05-26T04:40:00+0000
T:statschannel:1:A
A:statschannel:System test statschannel
I:statschannel:PORTS:24535,24536,24537,24538,24539,24540,24541,24542,24543,24544,24545,24546,24547
I:statschannel:starting servers
I:statschannel:checking consistency between named.stats and xml/json (1)
I:statschannel:checking malloced memory statistics xml/json (2)
I:statschannel:checking consistency between regular and compressed output (3)
I:statschannel:checking if compressed output is really compressed (4)
I:statschannel:fetching zone stats data after zone maintenance at startup (5)
I:statschannel:... using xml
I:statschannel:... using json
I:statschannel:fetching zone stats data after dynamic update (6)
I:statschannel:... using xml
I:statschannel:... using json
I:statschannel:fetch zone stats data after updating DNSKEY RRset (7)
I:statschannel:... using xml
I:statschannel:... using json
I:statschannel:exit status: 0
I:statschannel:stopping servers
I:statschannel:starting servers
D:statschannel:============================= test session starts ==============================
D:statschannel:platform linux -- Python 3.7.3, pytest-3.10.1, py-1.7.0, pluggy-0.8.0 -- /usr/bin/python3
D:statschannel:rootdir: /builds/isc-projects/bind9/bin/tests/system/statschannel, inifile:
D:statschannel:collecting ... collected 4 items
D:statschannel:
D:statschannel:tests-xml.py::test_zone_timers_primary_xml PASSED [ 25%]
D:statschannel:tests-xml.py::test_zone_timers_secondary_xml PASSED [ 50%]
D:statschannel:tests-xml.py::test_zone_with_many_keys_xml PASSED [ 75%]
D:statschannel:tests-xml.py::test_traffic_xml PASSED [100%]
D:statschannel:
D:statschannel:=========================== 4 passed in 0.08 seconds ===========================
I:statschannel:stopping servers
I:statschannel:starting servers
D:statschannel:============================= test session starts ==============================
D:statschannel:platform linux -- Python 3.7.3, pytest-3.10.1, py-1.7.0, pluggy-0.8.0 -- /usr/bin/python3
D:statschannel:rootdir: /builds/isc-projects/bind9/bin/tests/system/statschannel, inifile:
D:statschannel:collecting ... collected 4 items
D:statschannel:
D:statschannel:tests-json.py::test_zone_timers_primary_json PASSED [ 25%]
D:statschannel:tests-json.py::test_zone_timers_secondary_json PASSED [ 50%]
```
and [`v9_16`](https://gitlab.isc.org/isc-projects/bind9/-/jobs/1749328/raw) (openSUSE Tumbleweed):
```
S:statschannel:2021-05-26T04:37:15+0000
T:statschannel:1:A
A:statschannel:System test statschannel
I:statschannel:PORTRANGE:12700 - 12799
I:statschannel:starting servers
I:statschannel:checking consistency between named.stats and xml/json (1)
I:statschannel:checking malloced memory statistics xml/json (2)
I:statschannel:checking consistency between regular and compressed output (3)
I:statschannel:checking if compressed output is really compressed (4)
I:statschannel:fetching zone stats data after zone maintenance at startup (5)
I:statschannel:... using xml
I:statschannel:... using json
I:statschannel:fetching zone stats data after dynamic update (6)
I:statschannel:... using xml
I:statschannel:... using json
I:statschannel:fetch zone stats data after updating DNSKEY RRset (7)
I:statschannel:... using xml
I:statschannel:... using json
I:statschannel:exit status: 0
I:statschannel:stopping servers
I:statschannel:starting servers
D:statschannel:============================= test session starts ==============================
D:statschannel:platform linux -- Python 3.8.10, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3.8
D:statschannel:rootdir: /builds/isc-projects/bind9/bin/tests/system/statschannel
D:statschannel:collecting ... collected 4 items
D:statschannel:
D:statschannel:tests-xml.py::test_zone_timers_primary_xml PASSED [ 25%]
D:statschannel:tests-xml.py::test_zone_timers_secondary_xml PASSED [ 50%]
```
I started noticing this hang this or the week before.
Looking at the system test itself, there were no significant changes for some time.
Unfortunately, with timeout termination there are no job artifacts.June 2021 (9.11.33, 9.11.33-S1, 9.16.17/9.16.18, 9.16.17-S1/9.16.18-S1, 9.17.14/9.17.15)https://gitlab.isc.org/isc-projects/bind9/-/issues/2723TLS key logging2021-12-22T20:08:49ZPetr Špačekpspacek@isc.orgTLS key logging### Description
Use-case: DoT/DoH debugging
Debugging encrypted transports is very hard because we do not see in the traffic, so plain PCAPs are useless.
### Request
Introduce a new logging channel for TLS keys, which would produce st...### Description
Use-case: DoT/DoH debugging
Debugging encrypted transports is very hard because we do not see in the traffic, so plain PCAPs are useless.
### Request
Introduce a new logging channel for TLS keys, which would produce stream of TLS pre-master secrets which can be used with Wireshark to decrypt TLS traffic. (Volume of the logged data can be significant so it's important to have some size limits on the file size - that's why I'm proposing to reuse logging machinery we have already.)
Open question is if it should somehow take into account `SSLKEYLOGFILE` environment variable as it is customary in [GnuTLS](https://gnutls.org/manual/html_node/Debugging-and-auditing.html) and [NSS](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Key_Log_Format). The reason is that environment variable will be easier to use when debugging something in an automated test systems (as opposed to modifying named.conf). Maybe `SSLKEYLOGFILE` environment variable could, if present, just generate in-memory logging config snippet?
### Links / references
- https://wiki.wireshark.org/TLS#Using_the_.28Pre.29-Master-Secret
- https://www.openssl.org/docs/man1.1.0/man3/SSL_SESSION_print_keylog.htmlJanuary 2022 (9.16.25, 9.16.25-S1, 9.17.22)https://gitlab.isc.org/isc-projects/bind9/-/issues/2722bad sizeof declaration in main2021-05-26T08:10:47ZMark Andrewsbad sizeof declaration in main```
** CID 331858: Incorrect expression (SIZEOF_MISMATCH)
/lib/ns/interfacemgr.c: 274 in ns_interfacemgr_create()
________________________________________________________________________________________________________
*** CID 331858...```
** CID 331858: Incorrect expression (SIZEOF_MISMATCH)
/lib/ns/interfacemgr.c: 274 in ns_interfacemgr_create()
________________________________________________________________________________________________________
*** CID 331858: Incorrect expression (SIZEOF_MISMATCH)
/lib/ns/interfacemgr.c: 274 in ns_interfacemgr_create()
268 #else /* ifdef USE_ROUTE_SOCKET */
269 isc_refcount_init(&mgr->references, 1);
270 #endif /* ifdef USE_ROUTE_SOCKET */
271 mgr->magic = IFMGR_MAGIC;
272 *mgrp = mgr;
273
CID 331858: Incorrect expression (SIZEOF_MISMATCH)
Passing argument "mgr->ncpus * 184UL /* sizeof (*mgr->clientmgrs[0]) */" to function "isc__mem_get" and then casting the return value to "ns_clientmgr_t **" is suspicious.
274 mgr->clientmgrs = isc_mem_get(mgr->mctx,
275 mgr->ncpus * sizeof(*mgr->clientmgrs[0]));
276 for (size_t i = 0; i < (size_t)mgr->ncpus; i++) {
277 result = ns_clientmgr_create(mgr->sctx, mgr->taskmgr,
278 mgr->timermgr, mgr->aclenv, (int)i,
279 &mgr->clientmgrs[i]);
________________________________________________________________________________________________________
```June 2021 (9.11.33, 9.11.33-S1, 9.16.17/9.16.18, 9.16.17-S1/9.16.18-S1, 9.17.14/9.17.15)https://gitlab.isc.org/isc-projects/bind9/-/issues/2721interfacemgr shutdown race2021-05-28T10:27:35ZMark Andrewsinterfacemgr shutdown raceJob [#1748465](https://gitlab.isc.org/isc-projects/bind9/-/jobs/1748465) failed for 80ca95a95c72012d2fbaaed102844f6921d9e192:
```
WARNING: ThreadSanitizer: data race
Write of size 8 at 0x000000000001 by thread T1 (mutexes: write M1):...Job [#1748465](https://gitlab.isc.org/isc-projects/bind9/-/jobs/1748465) failed for 80ca95a95c72012d2fbaaed102844f6921d9e192:
```
WARNING: ThreadSanitizer: data race
Write of size 8 at 0x000000000001 by thread T1 (mutexes: write M1):
#0 memset <null>
#1 memset /usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:10
#2 mem_put lib/isc/mem.c:361:3
#3 isc__mem_free lib/isc/mem.c:1012:2
#4 isc__mem_put lib/isc/mem.c:777:3
#5 ns_interface_destroy lib/ns/interfacemgr.c:713:2
#6 ns_interface_detach lib/ns/interfacemgr.c:730:3
#7 purge_old_interfaces lib/ns/interfacemgr.c:770:4
#8 ns_interfacemgr_shutdown lib/ns/interfacemgr.c:401:2
#9 shutdown_server bin/named/server.c:10086:2
#10 task_run lib/isc/task.c:816:5
#11 isc_task_run lib/isc/task.c:896:10
#12 isc__nm_async_task lib/isc/netmgr/netmgr.c:863:11
#13 process_netievent lib/isc/netmgr/netmgr.c:942:3
#14 process_queue lib/isc/netmgr/netmgr.c:1032:16
#15 process_all_queues lib/isc/netmgr/netmgr.c:783:25
#16 async_cb lib/isc/netmgr/netmgr.c:812:6
#17 <null> <null>
#18 isc__trampoline_run lib/isc/trampoline.c:184:11
Previous read of size 8 at 0x000000000001 by thread T2:
#0 memmove <null>
#1 isc___nmhandle_get lib/isc/netmgr/netmgr.c
#2 isc__nm_get_read_req lib/isc/netmgr/netmgr.c:2130:18
#3 isc__nm_tcpdns_processbuffer lib/isc/netmgr/tcpdns.c:787:8
#4 processbuffer lib/isc/netmgr/netmgr.c:2257:11
#5 isc__nm_process_sock_buffer lib/isc/netmgr/netmgr.c:2282:25
#6 isc__nm_resume_processing lib/isc/netmgr/netmgr.c:2338:2
#7 nmhandle_detach_cb lib/isc/netmgr/netmgr.c:1864:4
#8 isc__nmhandle_detach lib/isc/netmgr/netmgr.c:1804:3
#9 isc___nm_uvreq_put lib/isc/netmgr/netmgr.c:2462:3
#10 isc__nm_async_sendcb lib/isc/netmgr/netmgr.c:2748:2
#11 process_netievent lib/isc/netmgr/netmgr.c:994:3
#12 process_queue lib/isc/netmgr/netmgr.c:1032:16
#13 process_all_queues lib/isc/netmgr/netmgr.c:783:25
#14 async_cb lib/isc/netmgr/netmgr.c:812:6
#15 <null> <null>
#16 isc__trampoline_run lib/isc/trampoline.c:184:11
Location is heap block of size 1392 at 0x000000000032 allocated by thread T1:
#0 malloc <null>
#1 default_memalloc lib/isc/mem.c:411:8
#2 mem_get lib/isc/mem.c:343:8
#3 mem_allocateunlocked lib/isc/mem.c:918:7
#4 isc__mem_allocate lib/isc/mem.c:935:7
#5 isc__mem_get lib/isc/mem.c:740:11
#6 ns_interface_create lib/ns/interfacemgr.c:412:8
#7 ns_interface_setup lib/ns/interfacemgr.c:599:11
#8 do_scan lib/ns/interfacemgr.c:1199:14
#9 ns_interfacemgr_scan0 lib/ns/interfacemgr.c:1258:11
#10 ns_interfacemgr_scan lib/ns/interfacemgr.c:1306:11
#11 load_configuration bin/named/server.c:9110:11
#12 run_server bin/named/server.c:10054:2
#13 task_run lib/isc/task.c:816:5
#14 isc_task_run lib/isc/task.c:896:10
#15 isc__nm_async_task lib/isc/netmgr/netmgr.c:863:11
#16 process_netievent lib/isc/netmgr/netmgr.c:942:3
#17 process_queue lib/isc/netmgr/netmgr.c:1032:16
#18 process_all_queues lib/isc/netmgr/netmgr.c:783:25
#19 async_cb lib/isc/netmgr/netmgr.c:812:6
#20 <null> <null>
#21 isc__trampoline_run lib/isc/trampoline.c:184:11
Mutex M1 is already destroyed.
Thread T1 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:79:8
#2 isc__netmgr_create lib/isc/netmgr/netmgr.c:347:3
#3 isc_managers_create lib/isc/managers.c:39:2
#4 create_managers bin/named/main.c:941:11
#5 setup bin/named/main.c:1216:11
#6 main bin/named/main.c:1507:2
Thread T2 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:79:8
#2 isc__netmgr_create lib/isc/netmgr/netmgr.c:347:3
#3 isc_managers_create lib/isc/managers.c:39:2
#4 create_managers bin/named/main.c:941:11
#5 setup bin/named/main.c:1216:11
#6 main bin/named/main.c:1507:2
SUMMARY: ThreadSanitizer: data race in memset
```June 2021 (9.11.33, 9.11.33-S1, 9.16.17/9.16.18, 9.16.17-S1/9.16.18-S1, 9.17.14/9.17.15)Ondřej SurýOndřej Surýhttps://gitlab.isc.org/isc-projects/bind9/-/issues/2720ThreadSanitizer: data race lib/isc/unix/time.c:110 in isc_time_isepoch2021-06-09T13:57:29ZMichal NowakThreadSanitizer: data race lib/isc/unix/time.c:110 in isc_time_isepochJob [1742391](https://gitlab.isc.org/isc-projects/bind9/-/jobs/1742391) on `v9_16` failed in the `dnssec` system test with the following TSAN error:
```
WARNING: ThreadSanitizer: data race
Read of size 4 at 0x000000000001 by thread T...Job [1742391](https://gitlab.isc.org/isc-projects/bind9/-/jobs/1742391) on `v9_16` failed in the `dnssec` system test with the following TSAN error:
```
WARNING: ThreadSanitizer: data race
Read of size 4 at 0x000000000001 by thread T1 (mutexes: read M1, write M2):
#0 isc_time_isepoch lib/isc/unix/time.c:110
#1 zone_settimer lib/dns/zone.c:14649
#2 dns_zone_maintenance lib/dns/zone.c:6281
#3 dns_zonemgr_forcemaint lib/dns/zone.c:18190
#4 view_loaded server.c:9654
#5 call_loaddone lib/dns/zt.c:301
#6 doneloading lib/dns/zt.c:575
#7 zone_asyncload lib/dns/zone.c:2259
#8 task_run lib/isc/task.c:845
#9 isc_task_run lib/isc/task.c:938
#10 isc__nm_async_task lib/isc/netmgr/netmgr.c:855
#11 process_netievent lib/isc/netmgr/netmgr.c:934
#12 process_queue lib/isc/netmgr/netmgr.c:1003
#13 process_all_queues lib/isc/netmgr/netmgr.c:775
#14 async_cb lib/isc/netmgr/netmgr.c:804
#15 <null> <null>
#16 isc__trampoline_run lib/isc/trampoline.c:191
#17 <null> <null>
Previous write of size 4 at 0x000000000001 by thread T2:
#0 isc_time_set lib/isc/unix/time.c:93
#1 set_key_expiry_warning lib/dns/zone.c:6430
#2 del_sigs lib/dns/zone.c:6711
#3 zone_resigninc lib/dns/zone.c:7113
#4 zone_maintenance lib/dns/zone.c:11111
#5 zone_timer lib/dns/zone.c:14588
#6 task_run lib/isc/task.c:845
#7 isc_task_run lib/isc/task.c:938
#8 isc__nm_async_task lib/isc/netmgr/netmgr.c:855
#9 process_netievent lib/isc/netmgr/netmgr.c:934
#10 process_queue lib/isc/netmgr/netmgr.c:1003
#11 process_all_queues lib/isc/netmgr/netmgr.c:775
#12 async_cb lib/isc/netmgr/netmgr.c:804
#13 <null> <null>
#14 isc__trampoline_run lib/isc/trampoline.c:191
#15 <null> <null>
Location is heap block of size 2801 at 0x000000000023 allocated by thread T3:
#0 malloc <null>
#1 default_memalloc lib/isc/mem.c:717
#2 mem_get lib/isc/mem.c:626
#3 mem_allocateunlocked lib/isc/mem.c:1292
#4 isc___mem_allocate lib/isc/mem.c:1312
#5 isc__mem_allocate lib/isc/mem.c:2563
#6 isc___mem_get lib/isc/mem.c:1061
#7 isc__mem_get lib/isc/mem.c:2542
#8 dns_zone_create lib/dns/zone.c:1047
#9 dns_zonemgr_createzone lib/dns/zone.c:18063
#10 configure_zone server.c:6451
#11 configure_view server.c:4024
#12 load_configuration server.c:9096
#13 run_server server.c:9815
#14 task_run lib/isc/task.c:845
#15 isc_task_run lib/isc/task.c:938
#16 isc__nm_async_task lib/isc/netmgr/netmgr.c:855
#17 process_netievent lib/isc/netmgr/netmgr.c:934
#18 process_queue lib/isc/netmgr/netmgr.c:1003
#19 process_all_queues lib/isc/netmgr/netmgr.c:775
#20 async_cb lib/isc/netmgr/netmgr.c:804
#21 <null> <null>
#22 isc__trampoline_run lib/isc/trampoline.c:191
#23 <null> <null>
Mutex M1 is already destroyed.
Mutex M2 is already destroyed.
Thread T3 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:79
#2 isc__netmgr_create lib/isc/netmgr/netmgr.c:350
#3 isc_managers_create lib/isc/managers.c:33
#4 create_managers main.c:920
#5 setup main.c:1245
#6 main main.c:1548
Thread T2 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:79
#2 isc__netmgr_create lib/isc/netmgr/netmgr.c:350
#3 isc_managers_create lib/isc/managers.c:33
#4 create_managers main.c:920
#5 setup main.c:1245
#6 main main.c:1548
Thread T3 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:79
#2 isc__netmgr_create lib/isc/netmgr/netmgr.c:350
#3 isc_managers_create lib/isc/managers.c:33
#4 create_managers main.c:920
#5 setup main.c:1245
#6 main main.c:1548
SUMMARY: ThreadSanitizer: data race lib/isc/unix/time.c:110 in isc_time_isepoch
```
Similar TSAN error in the same CI job: [d84c7cc0b14ccdcf28a2c70083942efdc1f99addab62b39f3ab8f81f1e507975.tsan](/uploads/49ef557a68a7180b898ac7216f50681a/d84c7cc0b14ccdcf28a2c70083942efdc1f99addab62b39f3ab8f81f1e507975.tsan)July 2021 (9.11.34, 9.11.34-S1, 9.16.19, 9.16.19-S1, 9.17.16)Mark AndrewsMark Andrewshttps://gitlab.isc.org/isc-projects/bind9/-/issues/2718Can't get rcode statics by zone from statistics-channel.2021-05-25T10:26:37ZManabu SonodaCan't get rcode statics by zone from statistics-channel.<!--
If the bug you are reporting is potentially security-related - for example,
if it involves an assertion failure or other crash in `named` that can be
triggered repeatedly - then please do *NOT* report it here, but send an
email to [...<!--
If the bug you are reporting is potentially security-related - for example,
if it involves an assertion failure or other crash in `named` that can be
triggered repeatedly - then please do *NOT* report it here, but send an
email to [security-officer@isc.org](security-officer@isc.org).
-->
### Summary
Can't get rcode statics by zone from statistics-channel.
(Summarize the bug encountered concisely.)
### BIND version used
BIND 9.11.31 (Extended Support Version) <id:ac3f4eb>
### Steps to reproduce
```
$ dig @localhost example.jp TXT
$ curl http://localhost:10053/json/v1 | jq '.views._default.zones '
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 611k 100 611k 0 0 2282k 0 --:--:-- --:--:-- --:--:-- 2274k
[
{
"name": "example.jp",
"class": "IN",
"type": "slave",
"rcodes": {
"QrySuccess": 1,
"QryAuthAns": 1,
"QryUDP": 1
},
"qtypes": {
"TXT": 1
}
},
```
### What is the current *bug* behavior?
- Key is "rcodes", but returned nsstats.
### What is the expected *correct* behavior?
- Rcode counter value is assigned to "rcodes".
```
{
"name": "example.jp",
"class": "IN",
"type": "slave",
"rcodes": {
"QUERY": 1,
"IQUERY": 0,
"STATUS": 0,
"RESERVED3": 0,
"NOTIFY": 0,
"UPDATE": 0,
"RESERVED6": 0,
"RESERVED7": 0,
"RESERVED8": 0,
"RESERVED9": 0,
"RESERVED10": 0,
"RESERVED11": 0,
"RESERVED12": 0,
"RESERVED13": 0,
"RESERVED14": 0,
"RESERVED15": 0
},
"qtypes": {
"TXT": 1
}
```
### Relevant configuration files
```
controls {
inet 127.0.0.1 port 953 allow {
127.0.0.1/32;
} keys {
"rndc-key";
};
};
options {
directory "/etc/named";
interface-interval 0;
listen-on {
"any";
};
listen-on-v6 {
"any";
};
querylog no;
check-names slave warn;
recursion no;
allow-query {
"any";
};
masterfile-format text;
multi-master yes;
notify explicit;
zone-statistics yes;
};
statistics-channels {
inet 127.0.0.1 port 10053 allow {
127.0.0.1/32;
};
};
key "rndc-key" {
algorithm "hmac-sha256";
secret "????????????????????????????????????????????";
};
zone "example.jp" {
type master;
file "example.jp";
};
```
### Relevant logs and/or screenshots
```
/ # dig @localhost example.jp A
; <<>> DiG 9.16.15 <<>> @localhost example.jp A
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35022
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: 3c4dff88f795ae6aa18c4f6f60ab43d66d51e96071fb1f12 (good)
;; QUESTION SECTION:
;example.jp. IN A
;; ANSWER SECTION:
example.jp. 3600 IN A 127.0.0.1
;; AUTHORITY SECTION:
example.jp. 3600 IN NS localhost.
;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon May 24 06:12:38 UTC 2021
;; MSG SIZE rcvd: 106
/ # curl http://localhost:10053/json/v1/zones
{
"json-stats-version":"1.2",
"boot-time":"2021-05-24T06:09:57.895Z",
"config-time":"2021-05-24T06:12:21.187Z",
"current-time":"2021-05-24T06:12:42.304Z",
"version":"9.11.31",
"views":{
"_default":{
"zones":[
{
"name":"example.jp",
"class":"IN",
"serial":0,
"type":"master",
"rcodes":{
"QrySuccess":1,
"QryAuthAns":1,
"QryUDP":1
},
"qtypes":{
"A":1
}
}
]
},
"_bind":{
"zones":[
{
"name":"authors.bind",
"class":"CH",
"serial":0,
"type":"builtin"
},
{
"name":"hostname.bind",
"class":"CH",
"serial":0,
"type":"builtin"
},
{
"name":"version.bind",
"class":"CH",
"serial":0,
"type":"builtin"
},
{
"name":"id.server",
"class":"CH",
"serial":0,
"type":"builtin"
}
]
}
}
}
### Possible fixes
(If you can, link to the line of code that might be responsible for the
problem.)https://gitlab.isc.org/isc-projects/bind9/-/issues/2717Fix sysconfdir path in man pages with hardcoded default paths2022-02-25T13:57:06ZAthos RibeiroFix sysconfdir path in man pages with hardcoded default pathsSome man pages have hardcoded values for the default configuration file paths.
This path is configurable through the `sysconfdir` variable, and the manpages
should perform the proper substitutions whenever the default value is changed.
...Some man pages have hardcoded values for the default configuration file paths.
This path is configurable through the `sysconfdir` variable, and the manpages
should perform the proper substitutions whenever the default value is changed.
This attached patch (**which applies against the `v9_16` branch**) uses the
already existing template system for building the docs toperform such
substitutions.
[0004-fix-sysconfdir-path-in-man-pages.patch](/uploads/f1029c9d28f49f6f0179d18914d20c16/0004-fix-sysconfdir-path-in-man-pages.patch)March 2022 (9.11.37, 9.11.37-S1, 9.16.27, 9.16.27-S1, 9.18.1)https://gitlab.isc.org/isc-projects/bind9/-/issues/2716signing a zone fails if the same zone file is used in several views2021-05-21T23:41:34ZHugo Grostabussiatsigning a zone fails if the same zone file is used in several views### Summary
named will fails to sign a zone if that zone is present in multiple views and use the same source zone file.
In my example, those zones use the same dnssec-policy, but the issue also happens with distinct policies.
### BIN...### Summary
named will fails to sign a zone if that zone is present in multiple views and use the same source zone file.
In my example, those zones use the same dnssec-policy, but the issue also happens with distinct policies.
### BIND version used
```
BIND 9.16.15 (Stable Release) <id:4469e3e>
running on Linux x86_64 5.12.4-arch1-2 #1 SMP PREEMPT Sat, 15 May 2021 20:58:02 +0000
built by make with '--prefix=/usr' '--sysconfdir=/etc' '--sbindir=/usr/bin' '--localstatedir=/var' '--disable-static' '--enable-fixed-rrset' '--enable-full-report' '--enable-dnsrps' '--with-python=/usr/bin/python' '--with-maxminddb' '--with-openssl' '--with-libidn2' '--with-json-c' '--with-libxml2' '--with-lmdb' '--with-libtool' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -DDIG_SIGCHASE -fcommon' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'
compiled by GCC 10.2.0
compiled with OpenSSL version: OpenSSL 1.1.1k 25 Mar 2021
linked to OpenSSL version: OpenSSL 1.1.1k 25 Mar 2021
compiled with libuv version: 1.41.0
linked to libuv version: 1.41.0
compiled with libxml2 version: 2.9.10
linked to libxml2 version: 20910
compiled with json-c version: 0.15
linked to json-c version: 0.15
compiled with zlib version: 1.2.11
linked to zlib version: 1.2.11
linked to maxminddb version: 1.6.0
threads support is enabled
default paths:
named configuration: /etc/named.conf
rndc configuration: /etc/rndc.conf
DNSSEC root key: /etc/bind.keys
nsupdate session key: /var/run/named/session.key
named PID file: /var/run/named/named.pid
named lock file: /var/run/named/named.lock
geoip-directory: /usr/share/GeoIP
```
### Steps to reproduce
1. Use the provided `/etc/named.conf` and `/var/named/example.org.zone` below for a new named config.
2. Start named
3. Error messages appear in the logs (see first log below)
4. Increment the serial in the zone file and run `rndc reload`
5. Another flurry of error messages appear in the logs (see second log below)
### What is the current *bug* behavior?
Signing the zone fails and confusing error messages about a malformed transaction with mismatched serials are logged.
### What is the expected *correct* behavior?
One of those behaviors:
1. Fail to load the configuration with a helpful error message indicating that you must use a different zone file in each view, even if the content is the same (e.g. copy the zone file or make a symlink)
2. Add a suffix to the generated signed zone files so that their names are distinct per view.
### Relevant configuration files
named.conf
```
options {
directory "/var/named";
pid-file "/run/named/named.pid";
auth-nxdomain yes;
datasize default;
listen-on-v6 { any; };
allow-recursion { none; };
allow-transfer { none; };
allow-update { none; };
recursion no;
notify no;
version none;
hostname none;
server-id none;
max-cache-size 5%;
key-directory "dnssec-keys";
};
acl "guest" {
192.168.99.0/24;
};
dnssec-policy custom {
keys {
csk lifetime unlimited algorithm ecdsa256;
};
};
view "internet" {
match-clients { any; };
zone "example.org" IN {
type master;
file "example.org.zone";
dnssec-policy custom;
};
};
view "guest" {
match-clients { guest; };
zone "example.org" IN {
type master;
file "example.org.zone";
dnssec-policy custom;
};
};
logging {
channel xfer-log {
file "/var/log/named.log";
print-category yes;
print-severity yes;
print-time yes;
severity info;
};
channel default-log {
syslog daemon;
severity warning;
print-category yes;
print-severity yes;
};
category default { default-log; };
category xfer-in { xfer-log; };
category xfer-out { xfer-log; };
category notify { xfer-log; };
};
```
example.org.zone
```
@ 1D IN SOA exemple.org. root.example.org. (
2021051911 ; serial (yyyymmdd##)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum ttl
1D IN NS example.org.
example.org. 1D IN A 10.0.0.1
www.example.org. 1D IN A 10.0.0.1
```
### Relevant logs and/or screenshots
Errors on first start with all the keys, .signed files and .jnl files removed:
```
general: error: zone example.org/IN/guest (signed): receive_secure_serial: unchanged
general: error: zone example.org/IN/internet (signed): receive_secure_serial: unchanged
general: error: malformed transaction: example.org.zone.signed.jnl last serial 2021051912 != transaction first serial 2021051911
general: error: zone example.org/IN/internet (signed): zone_rekey:dns_journal_write_transaction -> unexpected error
```
Errors after incrementing the zone serial and reloading:
```
general: error: zone example.org/IN/internet (signed): could not get zone keys for secure dynamic update
general: error: malformed transaction: example.org.zone.signed.jnl last serial 2021051913 != transaction first serial 2021051911
general: error: zone example.org/IN/internet (signed): receive_secure_serial:dns_journal_write_transaction -> unexpected error
general: error: zone example.org/IN/internet (signed): receive_secure_serial: unexpected error
general: error: malformed transaction: example.org.zone.jnl last serial 2021052100 != transaction first serial 2021051911
general: error: zone example.org/IN/guest (unsigned): ixfr-from-differences: failed: Success
general: error: malformed transaction: example.org.zone.signed.jnl last serial 2021051913 != transaction first serial 2021051911
general: error: zone example.org/IN/internet (signed): zone_rekey:dns_journal_write_transaction -> unexpected error
general: error: zone example.org/IN/guest (signed): could not get zone keys for secure dynamic update
```
### Possible fixes
Copy the zone file or symlink it as many times there are views using it.https://gitlab.isc.org/isc-projects/bind9/-/issues/2714Release Checklist for BIND 9.11.33, BIND 9.11.33-S1, BIND 9.16.17, BIND 9.16....2021-06-22T20:39:37ZMichał KępieńRelease Checklist for BIND 9.11.33, BIND 9.11.33-S1, BIND 9.16.17, BIND 9.16.17-S1, 9.17.14## Release Schedule
**Code Freeze:** Wednesday, June 2nd, 2021
**Tagging Deadline:** Monday, June 7th, 2021
**Public Release:** Wednesday, June 16th, 2021
## Documentation Review Links
**Closed issues assigned to the milestone witho...## Release Schedule
**Code Freeze:** Wednesday, June 2nd, 2021
**Tagging Deadline:** Monday, June 7th, 2021
**Public Release:** Wednesday, June 16th, 2021
## Documentation Review Links
**Closed issues assigned to the milestone without a release note:**
- [9.17.14](https://gitlab.isc.org/isc-projects/bind9/-/issues?scope=all&utf8=%E2%9C%93&state=closed&milestone_title=June%202021%20(9.11.33%2C%209.11.33-S1%2C%209.16.17%2C%209.16.17-S1%2C%209.17.14)¬[label_name][]=Release%20Notes¬[label_name][]=Duplicate&label_name[]=v9.17)
- [9.16.17](https://gitlab.isc.org/isc-projects/bind9/-/issues?scope=all&utf8=%E2%9C%93&state=closed&milestone_title=June%202021%20(9.11.33%2C%209.11.33-S1%2C%209.16.17%2C%209.16.17-S1%2C%209.17.14)¬[label_name][]=Release%20Notes¬[label_name][]=Duplicate&label_name[]=v9.16)
- [9.11.33](https://gitlab.isc.org/isc-projects/bind9/-/issues?scope=all&utf8=%E2%9C%93&state=closed&milestone_title=June%202021%20(9.11.33%2C%209.11.33-S1%2C%209.16.17%2C%209.16.17-S1%2C%209.17.14)¬[label_name][]=Release%20Notes¬[label_name][]=Duplicate&label_name[]=v9.11)
**Merge requests merged into the milestone without a release note:**
- [9.17.14](https://gitlab.isc.org/isc-projects/bind9/-/merge_requests?scope=all&utf8=%E2%9C%93&state=merged&milestone_title=June%202021%20(9.11.33%2C%209.11.33-S1%2C%209.16.17%2C%209.16.17-S1%2C%209.17.14)¬[label_name][]=Release%20Notes&target_branch=main)
- [9.16.17](https://gitlab.isc.org/isc-projects/bind9/-/merge_requests?scope=all&utf8=%E2%9C%93&state=merged&milestone_title=June%202021%20(9.11.33%2C%209.11.33-S1%2C%209.16.17%2C%209.16.17-S1%2C%209.17.14)¬[label_name][]=Release%20Notes&target_branch=v9_16)
- [9.11.33](https://gitlab.isc.org/isc-projects/bind9/-/merge_requests?scope=all&utf8=%E2%9C%93&state=merged&milestone_title=June%202021%20(9.11.33%2C%209.11.33-S1%2C%209.16.17%2C%209.16.17-S1%2C%209.17.14)¬[label_name][]=Release%20Notes&target_branch=v9_11)
**Merge requests merged into the milestone without a `CHANGES` entry:**
- [9.17.14](https://gitlab.isc.org/isc-projects/bind9/-/merge_requests?scope=all&utf8=%E2%9C%93&state=merged&milestone_title=June%202021%20(9.11.33%2C%209.11.33-S1%2C%209.16.17%2C%209.16.17-S1%2C%209.17.14)&label_name[]=No%20CHANGES&target_branch=main)
- [9.16.17](https://gitlab.isc.org/isc-projects/bind9/-/merge_requests?scope=all&utf8=%E2%9C%93&state=merged&milestone_title=June%202021%20(9.11.33%2C%209.11.33-S1%2C%209.16.17%2C%209.16.17-S1%2C%209.17.14)&label_name[]=No%20CHANGES&target_branch=v9_16)
- [9.11.33](https://gitlab.isc.org/isc-projects/bind9/-/merge_requests?scope=all&utf8=%E2%9C%93&state=merged&milestone_title=June%202021%20(9.11.33%2C%209.11.33-S1%2C%209.16.17%2C%209.16.17-S1%2C%209.17.14)&label_name[]=No%20CHANGES&target_branch=v9_11)
## Release Checklist
### Before the Code Freeze
- [x] ***(QA)*** Inform Support and Marketing of impending release (and give estimated release dates).
- [x] ***(QA)*** Ensure there are no permanent test failures on any platform.
- [x] ***(QA)*** Check Perflab to ensure there has been no unexplained drop in performance for the versions being released.
- [x] ***(QA)*** Check whether all issues assigned to the release milestone are resolved[^1].
- [x] ***(QA)*** Ensure that there are no outstanding merge requests in the private repository[^1] (Subscription Edition only).
- [x] ***(QA)*** Ensure all merge requests marked for backporting have been indeed backported.
### Before the Tagging Deadline
- [x] ***(QA)*** Look for outstanding documentation issues (e.g. `CHANGES` mistakes) and address them if any are found.
- [x] ***(QA)*** Ensure release notes are correct, ask Support and Marketing to check them as well.
- [x] ***(QA)*** Update API files for libraries with new version information.
- [x] ***(QA)*** Change software version and library versions in `configure.ac` (new major release only).
- [x] ***(QA)*** Rebuild `configure` using Autoconf on `docs.isc.org`.
- [x] ***(QA)*** Update `CHANGES`.
- [x] ***(QA)*** Update `CHANGES.SE` (Subscription Edition only).
- [x] ***(QA)*** Update `README.md`.
- [x] ***(QA)*** Update `version`.
- [x] ***(QA)*** Build documentation on `docs.isc.org`.
- [x] ***(QA)*** Check that the formatting is correct for text, PDF, and HTML versions of release notes.
- [x] ***(QA)*** Check that the formatting of the generated man pages is correct.
- [x] ***(QA)*** Tag the releases in the private repository (`git tag -s -m "BIND 9.x.y" v9_x_y`).
### Before the ASN Deadline (for ASN Releases) or the Public Release Date (for Regular Releases)
- [x] ***(QA)*** Verify GitLab CI results for the tags created and prepare a QA report for the releases to be published.
- [x] ***(QA)*** Request signatures for the tarballs, providing their location and checksums.
- [x] ***(Signers)*** Validate tarball checksums, sign tarballs, and upload signatures.
- [x] ***(QA)*** Verify tarball signatures and check tarball checksums again.
- [x] ***(Support)*** Pre-publish ASN and/or Subscription Edition tarballs so that packages can be built.
- [x] ***(QA)*** Build and test ASN and/or Subscription Edition packages.
- [x] ***(QA)*** Notify Support that the releases have been prepared.
- [x] ***(Support)*** Send out ASNs (if applicable).
### On the Day of Public Release
- [x] ***(Support)*** Wait for clearance from Security Officer to proceed with the public release (if applicable).
- [x] ***(Support)*** Place tarballs in public location on FTP site.
- [x] ***(Support)*** Publish links to downloads on ISC website.
- [x] ***(Support)*** Write release email to *bind-announce*.
- [x] ***(Support)*** Write email to *bind-users* (if a major release).
- [x] ***(Support)*** Send eligible customers updated links to the Subscription Edition (update the -S edition delivery tickets, even if those links were provided earlier via an ASN ticket).
- [x] ***(Support)*** Update tickets in case of waiting support customers.
- [x] ***(QA)*** Build and test any outstanding private packages.
- [x] ***(QA)*** Build public packages (`*.deb`, RPMs).
- [x] ***(QA)*** Inform Marketing of the release.
- [x] ***(QA)*** Update the internal [BIND release dates wiki page](https://wiki.isc.org/bin/view/Main/BindReleaseDates) when public announcement has been made.
- [x] ***(Marketing)*** Post short note to Twitter.
- [x] ***(Marketing)*** Update [Wikipedia entry for BIND](https://en.wikipedia.org/wiki/BIND).
- [x] ***(Marketing)*** Write blog article (if a major release).
- [x] ***(QA)*** Ensure all new tags are annotated and signed.
- [x] ***(QA)*** Push tags for the published releases to the public repository.
- [x] ***(QA)*** Merge the automatically prepared `prep 9.x.y` commit which updates `version` and documentation on the release branch into the relevant maintenance branch (`v9_x`).
- [x] ***(QA)*** For each maintained branch, update the `BIND_BASELINE_VERSION` variable for the `abi-check` job in `.gitlab-ci.yml` to the latest published BIND version tag for a given branch.
- [x] ***(QA)*** Prepare empty release notes for the next set of releases.
- [x] ***(QA)*** Sanitize confidential issues which are assigned to the current release milestone and do not describe a security vulnerability, then make them public.
- [x] ***(QA)*** Sanitize confidential issues which are assigned to older release milestones and describe security vulnerabilities, then make them public if appropriate[^2].
- [x] ***(QA)*** Update QA tools used in GitLab CI (e.g. Flake8, PyLint) by modifying the relevant `Dockerfile`.
[^1]: If not, use the time remaining until the tagging deadline to ensure all outstanding issues are either resolved or moved to a different milestone.
[^2]: As a rule of thumb, security vulnerabilities which have reproducers merged to the public repository are considered okay for full disclosure.June 2021 (9.11.33, 9.11.33-S1, 9.16.17/9.16.18, 9.16.17-S1/9.16.18-S1, 9.17.14/9.17.15)Michał KępieńMichał Kępień2021-06-16https://gitlab.isc.org/isc-projects/bind9/-/issues/2713Intermittent crashes in the "tkey" system test caused by broken dns_name_t st...2021-05-22T05:17:59ZMichał KępieńIntermittent crashes in the "tkey" system test caused by broken dns_name_t structuresThe following crash occurred on OpenBSD in the daily pipeline run for
`main` today:
https://gitlab.isc.org/isc-projects/bind9/-/jobs/1737486
```
D:tkey:--------------------------------------------------------------------------------
D:...The following crash occurred on OpenBSD in the daily pipeline run for
`main` today:
https://gitlab.isc.org/isc-projects/bind9/-/jobs/1737486
```
D:tkey:--------------------------------------------------------------------------------
D:tkey:Core was generated by `named'.
D:tkey:Program terminated with signal SIGABRT, Aborted.
D:tkey:#0 thrkill () at /tmp/-:3
D:tkey:[Current thread is 1 (process 151515)]
D:tkey:#0 thrkill () at /tmp/-:3
D:tkey:#1 0x00000b2a71112e0e in _libc_abort () at /usr/src/lib/libc/stdlib/abort.c:51
D:tkey:#2 0x00000b27e595d563 in assertion_failed (file=<optimized out>, line=<optimized out>, type=<optimized out>, cond=<optimized out>) at main.c:249
D:tkey:#3 0x00000b2a8312f3a0 in isc_assertion_failed (file=0x0, line=6, type=isc_assertiontype_require, cond=0xb2a7109410a <thrkill+10> "r\001\303d\211\004% ") at assertions.c:52
D:tkey:#4 0x00000b2a9f5a2a14 in dns_name_getlabelsequence (source=<optimized out>, first=<optimized out>, n=<optimized out>, target=<optimized out>) at name.c:922
D:tkey:#5 0x00000b2a9f546950 in dns_compress_add (cctx=0xb2a3d5c6f98, name=<optimized out>, prefix=<optimized out>, offset=279) at compress.c:433
D:tkey:#6 0x00000b2a9f5a47c9 in dns_name_towire2 (name=0xb2a3d5c6a90, cctx=0xb2a3d5c6f98, target=0xb2a3d5c7f30, comp_offsetp=<optimized out>) at name.c:2048
D:tkey:#7 0x00000b2a9f60cb82 in towiresorted (rdataset=0xb2aaa240a00, owner_name=<optimized out>, cctx=<optimized out>, target=0xb2a3d5c7f30, order=0xa, order_arg=0xb2a00000117, partial=<optimized out>, options=1, countp=0xb2a3d5c6f4c, state=<optimized out>) at rdataset.c:456
D:tkey:#8 0x00000b2a9f60c4b4 in dns_rdataset_towiresorted (rdataset=0x0, owner_name=0x6, cctx=0x0, target=0xb2a7109410a <thrkill+10>, order=0xb29e76ab640, order_arg=0x0, options=1, countp=0xb2a3d5c6f4c) at rdataset.c:554
D:tkey:#9 0x00000b2a9f58dfae in dns_message_rendersection (msg=<optimized out>, sectionid=<optimized out>, options=<optimized out>) at message.c:2079
D:tkey:#10 0x00000b2a8d4b881d in ns_client_send (client=0xb2a5d77e2c8) at client.c:532
D:tkey:#11 0x00000b2a8d4c7639 in query_send (client=0xb2a5d77e2c8) at query.c:576
D:tkey:#12 0x00000b2a8d4c8054 in ns_query_start (client=0xb2a5d77e2c8, handle=<optimized out>) at query.c:12014
D:tkey:#13 0x00000b2a8d4bb163 in ns__client_request (handle=0xb2a5d77e060, eresult=<optimized out>, region=<optimized out>, arg=<optimized out>) at client.c:2176
D:tkey:#14 0x00000b2a83109b47 in isc__nm_async_readcb (worker=<optimized out>, ev0=<optimized out>) at netmgr/netmgr.c:2701
D:tkey:#15 0x00000b2a83109a20 in isc__nm_readcb (sock=0xb2a5d7985f0, uvreq=0xb2ad0c0f000, eresult=0) at netmgr/netmgr.c:2676
D:tkey:#16 0x00000b2a8310fbc8 in isc__nm_tcpdns_processbuffer (sock=0xb2a5d7985f0) at netmgr/tcpdns.c:817
D:tkey:#17 0x00000b2a83108d12 in processbuffer (sock=0xb2a5d7985f0) at netmgr/netmgr.c:2252
D:tkey:#18 isc__nm_process_sock_buffer (sock=0xb2a5d7985f0) at netmgr/netmgr.c:2277
D:tkey:#19 0x00000b2a8310fd76 in isc__nm_tcpdns_read_cb (stream=<optimized out>, nread=304, buf=0xb2a3d5c9218) at netmgr/tcpdns.c:880
D:tkey:#20 0x00000b29f22923af in uv.stream_io () from /usr/local/lib/libuv.so.3.0
D:tkey:#21 0x00000b29f2298a19 in uv.io_poll () from /usr/local/lib/libuv.so.3.0
D:tkey:#22 0x00000b29f22870b8 in uv_run () from /usr/local/lib/libuv.so.3.0
D:tkey:#23 0x00000b2a83100e8b in nm_thread (worker0=0xb2aa115b0c0) at netmgr/netmgr.c:713
D:tkey:#24 0x00000b2a83153e23 in isc__trampoline_run (arg=0xb2aa1160d60) at trampoline.c:184
D:tkey:#25 0x00000b2a24a34f51 in _rthread_start (v=<optimized out>) at /usr/src/lib/librthread/rthread.c:96
D:tkey:#26 0x00000b2a710b18ea in __tfork_thread () at /usr/src/lib/libc/arch/amd64/sys/tfork_thread.S:84
D:tkey:--------------------------------------------------------------------------------
```
One other similar crash happened on Ubuntu Xenial in a pipeline run for
!5072, which is a not-yet-merged `v9_16` backport of !5071 (which is
already merged to `main`):
https://gitlab.isc.org/isc-projects/bind9/-/jobs/1736455
```
D:tkey:--------------------------------------------------------------------------------
D:tkey:Core was generated by `/builds/isc-projects/bind9/bin/named/.libs/lt-named -D tkey-ns1 -X named.lock -'.
D:tkey:Program terminated with signal SIGABRT, Aborted.
D:tkey:#0 0x00007f7eeeb99438 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
D:tkey:[Current thread is 1 (Thread 0x7f7ee5ad9700 (LWP 12588))]
D:tkey:#0 0x00007f7eeeb99438 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
D:tkey:#1 0x00007f7eeeb9b03a in __GI_abort () at abort.c:89
D:tkey:#2 0x000000000042d655 in assertion_failed (file=<optimized out>, line=<optimized out>, type=<optimized out>, cond=<optimized out>) at ./main.c:266
D:tkey:#3 0x00007f7ef05ce3aa in isc_assertion_failed (file=file@entry=0x7f7ef105df2f "name.c", line=line@entry=1721, type=type@entry=isc_assertiontype_insist, cond=cond@entry=0x7f7ef10513dd "count <= 63") at assertions.c:46
D:tkey:#4 0x00007f7ef0f3e82d in set_offsets (name=name@entry=0x7f7ee5ad2eb0, offsets=offsets@entry=0x7f7ee5ad2d60 "", set_name=set_name@entry=0x7f7ee5ad2eb0) at name.c:1721
D:tkey:#5 0x00007f7ef0f4089e in dns_name_fromregion (name=name@entry=0x7f7ee5ad2eb0, r=r@entry=0x7f7ee5ad2e50) at name.c:1033
D:tkey:#6 0x00007f7ef0eefa77 in dns_compress_add (cctx=cctx@entry=0x7f7ee5ad3d90, name=name@entry=0x7f7ee5ad3450, prefix=<optimized out>, offset=279) at compress.c:424
D:tkey:#7 0x00007f7ef0f40461 in dns_name_towire2 (name=name@entry=0x7f7ee5ad3450, cctx=cctx@entry=0x7f7ee5ad3d90, target=target@entry=0x7f7ee5ad3cd0, comp_offsetp=comp_offsetp@entry=0x7f7ee5ad31d6) at name.c:2048
D:tkey:#8 0x00007f7ef0f42198 in dns_name_towire2 (name=name@entry=0x7f7ee5ad3450, cctx=cctx@entry=0x7f7ee5ad3d90, target=target@entry=0x7f7ee5ad3cd0, comp_offsetp=comp_offsetp@entry=0x7f7ee5ad31d6) at name.c:1952
D:tkey:#9 0x00007f7ef0fa6875 in towiresorted (rdataset=rdataset@entry=0x7f7edd05cad8, owner_name=owner_name@entry=0x7f7edd057430, cctx=<optimized out>, target=<optimized out>, order=<optimized out>, order_arg=order_arg@entry=0x7f7edd04a1f0, partial=false, options=1, countp=0x7f7ee5ad3c64, state=0x0) at rdataset.c:456
D:tkey:#10 0x00007f7ef0fa7464 in dns_rdataset_towiresorted (rdataset=rdataset@entry=0x7f7edd05cad8, owner_name=owner_name@entry=0x7f7edd057430, cctx=<optimized out>, target=<optimized out>, order=<optimized out>, order_arg=order_arg@entry=0x7f7edd04a1f0, options=1, countp=0x7f7ee5ad3c64) at rdataset.c:554
D:tkey:#11 0x00007f7ef0f2da3c in dns_message_rendersection (msg=0x7f7edd04a020, sectionid=sectionid@entry=1, options=options@entry=6) at message.c:2078
D:tkey:#12 0x00007f7ef12ca7ed in ns_client_send (client=client@entry=0x7f7ec8005588) at client.c:531
D:tkey:#13 0x00007f7ef12d6a7c in query_send (client=client@entry=0x7f7ec8005588) at query.c:568
D:tkey:#14 0x00007f7ef12e4de7 in ns_query_start (client=client@entry=0x7f7ec8005588, handle=handle@entry=0x7f7ec8005420) at query.c:11722
D:tkey:#15 0x00007f7ef12cdb02 in ns__client_request (handle=<optimized out>, eresult=<optimized out>, region=<optimized out>, arg=<optimized out>) at client.c:2163
D:tkey:#16 0x00007f7ef05ead94 in isc__nm_async_readcb (worker=worker@entry=0x0, ev0=ev0@entry=0x7f7ee5ad5980) at netmgr.c:2546
D:tkey:#17 0x00007f7ef05eaf26 in isc__nm_readcb (sock=sock@entry=0x7f7ec8000990, uvreq=uvreq@entry=0x7f7ed4015630, eresult=eresult@entry=0) at netmgr.c:2521
D:tkey:#18 0x00007f7ef05f4c96 in isc__nm_tcpdns_processbuffer (sock=sock@entry=0x7f7ec8000990) at tcpdns.c:813
D:tkey:#19 0x00007f7ef05e82fd in processbuffer (sock=0x7f7ec8000990) at netmgr.c:2150
D:tkey:#20 isc__nm_process_sock_buffer (sock=sock@entry=0x7f7ec8000990) at netmgr.c:2173
D:tkey:#21 0x00007f7ef05f4e22 in isc__nm_tcpdns_read_cb (stream=<optimized out>, nread=304, buf=0x7f7ee5ad5ab0) at tcpdns.c:876
D:tkey:#22 0x00007f7eef7a6aff in ?? () from /usr/lib/x86_64-linux-gnu/libuv.so.1
D:tkey:#23 0x00007f7eef7a724c in ?? () from /usr/lib/x86_64-linux-gnu/libuv.so.1
D:tkey:#24 0x00007f7eef7ac055 in ?? () from /usr/lib/x86_64-linux-gnu/libuv.so.1
D:tkey:#25 0x00007f7eef79defc in uv_run () from /usr/lib/x86_64-linux-gnu/libuv.so.1
D:tkey:#26 0x00007f7ef05eba8d in nm_thread (worker0=0x24f1860) at netmgr.c:710
D:tkey:#27 0x00007f7ef0604dfb in isc__trampoline_run (arg=0x291ca80) at trampoline.c:191
D:tkey:#28 0x00007f7eef57e6ba in start_thread (arg=0x7f7ee5ad9700) at pthread_create.c:333
D:tkey:#29 0x00007f7eeec6b4dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
D:tkey:--------------------------------------------------------------------------------
```
This strongly suggests that some issue with !5071 has been overlooked
due to the intermittent nature of the problem.June 2021 (9.11.33, 9.11.33-S1, 9.16.17/9.16.18, 9.16.17-S1/9.16.18-S1, 9.17.14/9.17.15)https://gitlab.isc.org/isc-projects/bind9/-/issues/2712BIND 9.16.15 as resolver: sudden increase in ServFail query results2022-07-27T08:42:19ZHåvard EidnesBIND 9.16.15 as resolver: sudden increase in ServFail query resultsAfter upgrading BIND to 9.16.15, we have now observed this problem twice. Suddenly, named starts returning a large portion of ServFail query results. Simultaneously, it appears that named stops responding to `rndc` commands.
![query-s...After upgrading BIND to 9.16.15, we have now observed this problem twice. Suddenly, named starts returning a large portion of ServFail query results. Simultaneously, it appears that named stops responding to `rndc` commands.
![query-status](/uploads/e733994ba3ec97f322dcff102546c60a/query-status.png)
This shows the query results tallied in 10s intervals, categorized of whether they return ServFailed status or something else ("normal" results).
We have a `dnscap` running on this host which covers this latter event, but nothing immediately obvious leaps out when looking at the resulting packet traces, although it is a bit like searching for the proverbial needle in a haystack. There also does not seem to be any interesting messages logged which can be correlated with this event.
So ... not too much concrete to go on here, but I have two questions:
1. Have you received any similar error / incident reports?
2. What, if anything, can I look for to collect more or better information to trace the actual root cause of this issue?
I run my BIND instances on NetBSD/amd64, currently 9.0 or slightly later.
Since this somewhat smells like a possibly security-related issue, I'll restrict its availability.
For now I have downgraded BIND on the offending instance to 9.16.12 (the previous version we ran), there are a few other things I need to do before re-trying with 9.16.15.https://gitlab.isc.org/isc-projects/bind9/-/issues/2710Allow for arbitrary DNSKEY/CDS/CDNSKEY records to be published2023-07-20T13:48:38ZMatthijs Mekkingmatthijs@isc.orgAllow for arbitrary DNSKEY/CDS/CDNSKEY records to be publishedTo support the multi-signer model (2), we want to allow arbitrary CDS/CDNSKEY records to be published in the zone. Currently this is not possible, because `zone_cdscheck` will error if there are CDS/CDNSKEY records in the zone that do no...To support the multi-signer model (2), we want to allow arbitrary CDS/CDNSKEY records to be published in the zone. Currently this is not possible, because `zone_cdscheck` will error if there are CDS/CDNSKEY records in the zone that do not have a matching DNSKEY record.
The multi-signer model (2) ensures for a safe transition from one provider to another provider without going insecure. In this model, both providers have their own KSK. To rollover to the other provider, the DS records of both KSKs need to be published at some point, and if the double DS RRset is known to the world, the old DS record can be removed and the transition to the new provider is complete.
If the parent supports DNSSEC Child-Parent synchronization, it may query for the child zone servers for CDS/CDNSKEY records in order to update their DS RRset. In the case of a provider transition, both providers should publish the CDS/CDNSKEY RRset that contain two entries, one corresponding to the KSK of one provider, one corresponding to the KSK of the other provider.
It should be possible that such CDS/CDNSKEY record is added to the zone file, or it may be added with a Dynamic Update.June 2023 (9.16.42, 9.16.42-S1, 9.18.16, 9.18.16-S1, 9.19.14)Matthijs Mekkingmatthijs@isc.orgMatthijs Mekkingmatthijs@isc.orghttps://gitlab.isc.org/isc-projects/bind9/-/issues/2709"make install" unnecessarily creates certain directories2021-05-20T12:22:22ZMichał Kępień"make install" unnecessarily creates certain directoriesCreating `etc/` is not necessary since 2009, when we [started][2]
shipping `bind.keys`. That being said, IMHO it was unnecessary even
before, but oh well.
Creating `var/` is not necessary since 2008, which is when
`named_os_openfile()`...Creating `etc/` is not necessary since 2009, when we [started][2]
shipping `bind.keys`. That being said, IMHO it was unnecessary even
before, but oh well.
Creating `var/` is not necessary since 2008, which is when
`named_os_openfile()` [started][1] calling `mkdir()`.
The bottom line is that neither of these directories should be created
by `make install` these days. I would fix it in ~"v9.16" and leave
~"v9.11" alone, this is nothing critical.
(Found while [working][3] on #2629/!4945.)
[1]: f6f1672b4e460571c418e43ae3bd0fae97e4c149
[2]: 3a30493983df83a3184dd1ecd39cf31ccdac3bad
[3]: https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/4945#note_214242June 2021 (9.11.33, 9.11.33-S1, 9.16.17/9.16.18, 9.16.17-S1/9.16.18-S1, 9.17.14/9.17.15)Michał KępieńMichał Kępieńhttps://gitlab.isc.org/isc-projects/bind9/-/issues/2708named doesn't compile with GCC 10.2021-05-28T10:33:58ZMark Andrewsnamed doesn't compile with GCC 10.```
CC libisc_la-lib.lo
lib.c:39:1: error: constructor priorities are not supported
39 | isc__initialize(void) ISC_CONSTRUCTOR(101);
| ^~~~~~~~~~~~~~~
lib.c:41:1: error: destructor priorities are not supported
41 | is...```
CC libisc_la-lib.lo
lib.c:39:1: error: constructor priorities are not supported
39 | isc__initialize(void) ISC_CONSTRUCTOR(101);
| ^~~~~~~~~~~~~~~
lib.c:41:1: error: destructor priorities are not supported
41 | isc__shutdown(void) ISC_DESTRUCTOR(101);
| ^~~~~~~~~~~~~
```June 2021 (9.11.33, 9.11.33-S1, 9.16.17/9.16.18, 9.16.17-S1/9.16.18-S1, 9.17.14/9.17.15)https://gitlab.isc.org/isc-projects/bind9/-/issues/2707RUNTIME_CHECK(((__libc_cond_wait(((cond)), ((&worker->lock))) == 0) ? 0 : 34)...2021-05-18T09:13:53ZMichal NowakRUNTIME_CHECK(((__libc_cond_wait(((cond)), ((&worker->lock))) == 0) ? 0 : 34) == 0) fail on NetBSD`main` and `v9_16` fail on NetBSD 9.1/9.2 on some unit tests and many system tests (e.g. auth) with:
```
netmgr/netmgr.c:882: fatal error: RUNTIME_CHECK(((__libc_cond_wait(((cond)), ((&worker->lock))) == 0) ? 0 : 34) == 0) failed
```
Th...`main` and `v9_16` fail on NetBSD 9.1/9.2 on some unit tests and many system tests (e.g. auth) with:
```
netmgr/netmgr.c:882: fatal error: RUNTIME_CHECK(((__libc_cond_wait(((cond)), ((&worker->lock))) == 0) ? 0 : 34) == 0) failed
```
The culprit has to be a recent change because `v9_17_12` works fine.
[query_test.log](/uploads/d9922a38acb20185c4569be757631f5f/query_test.log)
[notify_test.log](/uploads/2b5dc113e2cede4bcf7ca96e4eab42ec/notify_test.log)
[listenlist_test.log](/uploads/e29e79c222450adc26f46eed0e2dc5f8/listenlist_test.log)
[task_test.log](/uploads/9ff466b45de6bb843763baa59f5826bb/task_test.log)June 2021 (9.11.33, 9.11.33-S1, 9.16.17/9.16.18, 9.16.17-S1/9.16.18-S1, 9.17.14/9.17.15)https://gitlab.isc.org/isc-projects/bind9/-/issues/2706worker->cond_prio needs to be initialised2021-05-24T13:56:55ZMark Andrewsworker->cond_prio needs to be initialised```
netmgr/netmgr.c:882: fatal error: 18-May-2021 16:29:07.661 netmgr/netmgr.c:882: fatal error:
netmgr/netmgr.c:882: fatal error: netmgr/netmgr.c:882: fatal error: netmgr/netmgr.c:882: fatal error: netmgr/netmgr.c:882: fatal error: netm...```
netmgr/netmgr.c:882: fatal error: 18-May-2021 16:29:07.661 netmgr/netmgr.c:882: fatal error:
netmgr/netmgr.c:882: fatal error: netmgr/netmgr.c:882: fatal error: netmgr/netmgr.c:882: fatal error: netmgr/netmgr.c:882: fatal error: netmgr/netmgr.c:882: fatal error: RUNTIME_CHECK(((pthread_cond_wait(((cond)), ((&worker->lock))) == 0) ? 0 : 34) == 0) failedRUNTIME_CHECK(((pthread_cond_wait(((cond)), ((&worker->lock))) == 0) ? 0 : 34) == 0) failedRUNTIME_CHECK(((pthread_cond_wait(((cond)), ((&worker->lock))) == 0) ? 0 : 34) == 0) failedRUNTIME_CHECK(((pthread_cond_wait(((cond)), ((&worker->lock))) == 0) ? 0 : 34) == 0) failedRUNTIME_CHECK(((pthread_cond_wait(((cond)), ((&worker->lock))) == 0) ? 0 : 34) == 0) failedRUNTIME_CHECK(((pthread_cond_wait(((cond)), ((&worker->lock))) == 0) ? 0 : 34) == 0) failed18-May-2021 16:29:07.662 max open files (10240) is smaller than max sockets (21000)
18-May-2021 16:29:07.662 RUNTIME_CHECK(((pthread_cond_wait(((cond)), ((&worker->lock))) == 0) ? 0 : 34) == 0) failed
```June 2021 (9.11.33, 9.11.33-S1, 9.16.17/9.16.18, 9.16.17-S1/9.16.18-S1, 9.17.14/9.17.15)https://gitlab.isc.org/isc-projects/bind9/-/issues/2704Bind9 version 9.17.12 not starting without different DNS server2021-05-26T22:26:34ZDo HeBind9 version 9.17.12 not starting without different DNS serverI tried version **9.17.12** because of the new TLS features.
My _resolv.conf_ only contains the local resolver _127.0.0.1_ and _::1_.
The problem is that the new Bind9 doesn't start without having an alternative resolver in resolv.conf....I tried version **9.17.12** because of the new TLS features.
My _resolv.conf_ only contains the local resolver _127.0.0.1_ and _::1_.
The problem is that the new Bind9 doesn't start without having an alternative resolver in resolv.conf. It looks like something in the Bind9 startup process relies on DNS before itself is serving queries.
The last message in the logfile is:
`named[14264]: managed-keys-zone: Failed to create fetch for DNSKEY update`
After that the Bind9 process is running but doesn't answer queries.
Using the same build with the same config, but with an alternative resolver in _resolv.conf_ starts fine and serves DNS afterwards.
Starting with disabled DNSSEC makes the error message go away, but still spawns an unresponsive DNS resolver.
Thanks for any help.
Dominik
[named.conf](/uploads/100f7b902e9d09630c996a919c014367/named.conf)
[log.txt](/uploads/cdc57d006323edca79cd6817faab78e7/log.txt)June 2021 (9.11.33, 9.11.33-S1, 9.16.17/9.16.18, 9.16.17-S1/9.16.18-S1, 9.17.14/9.17.15)https://gitlab.isc.org/isc-projects/bind9/-/issues/2703gcc-10+ -fanalyzer reports dereference of NULL ‘text’ in server.c:147212021-07-14T19:15:38ZOndřej Surýgcc-10+ -fanalyzer reports dereference of NULL ‘text’ in server.c:14721```
server.c:14721:35: error: dereference of NULL ‘text’ [CWE-476] [-Werror=analyzer-null-dereference]
14721 | if (isc_buffer_usedlength(*text) > 0) {
../../lib/isc/include/isc/buffer.h:160:41: note: in definition of macro ‘isc_b...```
server.c:14721:35: error: dereference of NULL ‘text’ [CWE-476] [-Werror=analyzer-null-dereference]
14721 | if (isc_buffer_usedlength(*text) > 0) {
../../lib/isc/include/isc/buffer.h:160:41: note: in definition of macro ‘isc_buffer_usedlength’
160 | #define isc_buffer_usedlength(b) ((b)->used) /* d-a */
| ^
‘named_server_showzone’: event 1
|
|server.c:14633:1:
|14633 | named_server_showzone(named_server_t *server, isc_lex_t *lex,
| | ^~~~~~~~~~~~~~~~~~~~~
| | |
| | (1) entry to ‘named_server_showzone’
|
‘named_server_showzone’: event 2
|
|14649 | CHECK(zone_from_args(server, lex, NULL, &zone, zonename, text, true));
| | ^
| | |
| | (2) calling ‘zone_from_args’ from ‘named_server_showzone’
server.c:191:27: note: in definition of macro ‘CHECK’
| 191 | result = (op); \
| | ^~
|
+--> ‘zone_from_args’: event 3
|
|10671 | zone_from_args(named_server_t *server, isc_lex_t *lex, const char *zonetxt,
| | ^~~~~~~~~~~~~~
| | |
| | (3) entry to ‘zone_from_args’
|
‘zone_from_args’: event 4
|
|../../lib/isc/include/isc/util.h:287:20:
| 287 | #define REQUIRE(e) assert(e)
| | ^~~~~~
| | |
| | (4) following ‘true’ branch...
server.c:10686:9: note: in expansion of macro ‘REQUIRE’
|10686 | REQUIRE(zonep != NULL && *zonep == NULL);
| | ^~~~~~~
|
‘zone_from_args’: events 5-8
|
|10688 | if (skip) {
| | ^~ ~
| | | |
| | | (6) following ‘true’ branch (when ‘skip != 0’)...
| | (5) ...to here
|10689 | /* Skip the command name. */
|10690 | ptr = next_token(lex, text);
| | ~~~ ~~~~~~~~~~~~~~~~~~~~~
| | | |
| | | (8) calling ‘next_token’ from ‘zone_from_args’
| | (7) ...to here
|
+--> ‘next_token’: events 9-11
|
|10619 | next_token(isc_lex_t *lex, isc_buffer_t **text) {
| | ^~~~~~~~~~
| | |
| | (9) entry to ‘next_token’
|......
|10639 | (void)putnull(text);
| | ~~~~~~~~~~~~~
| | |
| | (11) ...to here
|......
|10643 | if (text != NULL) {
| | ~
| | |
| | (10) following ‘false’ branch (when ‘text’ is NULL)...
|
<------+
|
‘zone_from_args’: events 12-13
|
|10690 | ptr = next_token(lex, text);
| | ^~~~~~~~~~~~~~~~~~~~~
| | |
| | (12) returning to ‘zone_from_args’ from ‘next_token’
|10691 | if (ptr == NULL) {
| | ~
| | |
| | (13) following ‘true’ branch (when ‘ptr’ is NULL)...
|
‘zone_from_args’: event 14
|
|cc1:
| (14): ...to here
|
<------+
|
‘named_server_showzone’: event 15
|
|14649 | CHECK(zone_from_args(server, lex, NULL, &zone, zonename, text, true));
| | ^
| | |
| | (15) returning to ‘named_server_showzone’ from ‘zone_from_args’
server.c:191:27: note: in definition of macro ‘CHECK’
| 191 | result = (op); \
| | ^~
|
‘named_server_showzone’: event 16
|
| 192 | if (result != ISC_R_SUCCESS) \
| | ^
| | |
| | (16) following ‘true’ branch (when ‘result != 0’)...
server.c:14649:9: note: in expansion of macro ‘CHECK’
|14649 | CHECK(zone_from_args(server, lex, NULL, &zone, zonename, text, true));
| | ^~~~~
|
‘named_server_showzone’: event 17
|
| 193 | goto cleanup; \
| | ^~~~
| | |
| | (17) ...to here
server.c:14649:9: note: in expansion of macro ‘CHECK’
|14649 | CHECK(zone_from_args(server, lex, NULL, &zone, zonename, text, true));
| | ^~~~~
|
‘named_server_showzone’: events 18-19
|
|14717 | if (nzconfig != NULL) {
| | ^
| | |
| | (18) following ‘false’ branch...
|......
|14721 | if (isc_buffer_usedlength(*text) > 0) {
| | ~~
| | |
| | (19) ...to here
|
‘named_server_showzone’: event 20
|
|14721 | if (isc_buffer_usedlength(*text) > 0) {
../../lib/isc/include/isc/buffer.h:160:41: note: in definition of macro ‘isc_buffer_usedlength’
| 160 | #define isc_buffer_usedlength(b) ((b)->used) /* d-a */
| | ^
|
```August 2021 (9.11.35, 9.11.35-S1, 9.16.20, 9.16.20-S1, 9.17.17)https://gitlab.isc.org/isc-projects/bind9/-/issues/2702gcc-10+ -fanalyzer reports:2021-05-18T05:49:37ZOndřej Surýgcc-10+ -fanalyzer reports:```
rbtdb.c: In function ‘previous_closest_nsec’:
rbtdb.c:3714:21: error: dereference of NULL ‘firstp’ [CWE-476] [-Werror=analyzer-null-dereference]
3714 | if (*firstp) {
| ^~~~~~~
‘find_close...```
rbtdb.c: In function ‘previous_closest_nsec’:
rbtdb.c:3714:21: error: dereference of NULL ‘firstp’ [CWE-476] [-Werror=analyzer-null-dereference]
3714 | if (*firstp) {
| ^~~~~~~
‘find_closest_nsec’: events 1-2
|
| 3805 | find_closest_nsec(rbtdb_search_t *search, dns_dbnode_t **nodep,
| | ^~~~~~~~~~~~~~~~~
| | |
| | (1) entry to ‘find_closest_nsec’
|......
| 3842 | if (result != ISC_R_SUCCESS) {
| | ~
| | |
| | (2) following ‘false’ branch (when ‘result == 0’)...
|
‘find_closest_nsec’: event 3
|
|cc1:
| (3): ...to here
|
‘find_closest_nsec’: event 4
|
|../../lib/isc/include/isc/util.h:322:26:
| 322 | #define RUNTIME_CHECK(e) assert(e)
| | ^~~~~~
| | |
| | (4) following ‘true’ branch...
../../lib/isc/include/isc/util.h:162:17: note: in expansion of macro ‘RUNTIME_CHECK’
| 162 | RUNTIME_CHECK(isc_rwlock_lock((lp), (t)) == ISC_R_SUCCESS); \
| | ^~~~~~~~~~~~~
rbtdb.c:167:29: note: in expansion of macro ‘RWLOCK’
| 167 | #define NODE_LOCK(l, t) RWLOCK((l), (t))
| | ^~~~~~
rbtdb.c:3846:17: note: in expansion of macro ‘NODE_LOCK’
| 3846 | NODE_LOCK(&(search->rbtdb->node_locks[node->locknum].lock),
| | ^~~~~~~~~
|
‘find_closest_nsec’: event 5
|
|../../lib/isc/include/isc/util.h:164:71:
| 164 | (lp), (t), __FILE__, __LINE__)); \
| | ^
| | |
| | (5) ...to here
rbtdb.c:167:29: note: in expansion of macro ‘RWLOCK’
| 167 | #define NODE_LOCK(l, t) RWLOCK((l), (t))
| | ^~~~~~
rbtdb.c:3846:17: note: in expansion of macro ‘NODE_LOCK’
| 3846 | NODE_LOCK(&(search->rbtdb->node_locks[node->locknum].lock),
| | ^~~~~~~~~
|
‘find_closest_nsec’: events 6-14
|
| 3851 | for (header = node->data; header != NULL; header = header_next)
| | ^
| | |
| | (6) following ‘true’ branch (when ‘header’ is non-NULL)...
| 3852 | {
| 3853 | header_next = header->next;
| | ~~~~~~~~~~~
| | |
| | (7) ...to here
|......
| 3864 | if (NONEXISTENT(header)) {
| | ~
| | |
| | (8) following ‘false’ branch...
|......
| 3872 | if (header != NULL) {
| | ~~ ~
| | | |
| | | (10) following ‘true’ branch (when ‘header’ is non-NULL)...
| | (9) ...to here
|......
| 3877 | empty_node = false;
| | ~~~~~~~~~~
| | |
| | (11) ...to here
| 3878 | if (header->type == type) {
| | ~
| | |
| | (12) following ‘true’ branch...
| 3879 | found = header;
| | ~~~~~
| | |
| | (13) ...to here
| 3880 | if (foundsig != NULL) {
| | ~
| | |
| | (14) following ‘false’ branch (when ‘foundsig’ is NULL)...
|
‘find_closest_nsec’: event 15
|
|cc1:
| (15): ...to here
|
‘find_closest_nsec’: events 16-20
|
| 3891 | if (!empty_node) {
| | ^
| | |
| | (16) following ‘false’ branch (when ‘empty_node == 0’)...
| 3892 | if (found != NULL && search->rbtversion->havensec3 &&
| | ~~ ~
| | | |
| | | (18) following ‘true’ branch...
| | (17) ...to here
| 3893 | found->type == dns_rdatatype_nsec3 &&
| 3894 | !matchparams(found, search))
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (19) ...to here
| | (20) calling ‘matchparams’ from ‘find_closest_nsec’
|
+--> ‘matchparams’: event 21
|
| 3649 | matchparams(rdatasetheader_t *header, rbtdb_search_t *search) {
| | ^~~~~~~~~~~
| | |
| | (21) entry to ‘matchparams’
|
‘matchparams’: event 22
|
|../../lib/isc/include/isc/util.h:287:20:
| 287 | #define REQUIRE(e) assert(e)
| | ^~~~~~
| | |
| | (22) following ‘true’ branch...
rbtdb.c:3657:9: note: in expansion of macro ‘REQUIRE’
| 3657 | REQUIRE(header->type == dns_rdatatype_nsec3);
| | ^~~~~~~
|
‘matchparams’: event 23
|
| 3659 | raw = (unsigned char *)header + sizeof(*header);
| | ^~~
| | |
| | (23) ...to here
|
<------+
|
‘find_closest_nsec’: events 24-27
|
| 3892 | if (found != NULL && search->rbtversion->havensec3 &&
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 3893 | found->type == dns_rdatatype_nsec3 &&
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (25) following ‘false’ branch...
| 3894 | !matchparams(found, search))
| | ~^~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (24) returning to ‘find_closest_nsec’ from ‘matchparams’
| 3895 | {
| 3896 | empty_node = true;
| | ~~~~~~~~~~
| | |
| | (26) ...to here
|......
| 3899 | result = previous_closest_nsec(
| | ~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (27) calling ‘previous_closest_nsec’ from ‘find_closest_nsec’
| 3900 | type, search, name, origin, &prevnode,
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 3901 | NULL, NULL);
| | ~~~~~~~~~~~
|
+--> ‘previous_closest_nsec’: event 28
|
| 3690 | previous_closest_nsec(dns_rdatatype_t type, rbtdb_search_t *search,
| | ^~~~~~~~~~~~~~~~~~~~~
| | |
| | (28) entry to ‘previous_closest_nsec’
|
‘previous_closest_nsec’: event 29
|
|../../lib/isc/include/isc/util.h:287:20:
| 287 | #define REQUIRE(e) assert(e)
| | ^~~~~~
| | |
| | (29) following ‘true’ branch...
rbtdb.c:3699:9: note: in expansion of macro ‘REQUIRE’
| 3699 | REQUIRE(nodep != NULL && *nodep == NULL);
| | ^~~~~~~
|
‘previous_closest_nsec’: events 30-33
|
| 3701 | if (type == dns_rdatatype_nsec3) {
| | ^~ ~
| | | |
| | | (31) following ‘false’ branch (when ‘type != 50’)...
| | (30) ...to here
|......
| 3711 | target = dns_fixedname_initname(&ftarget);
| | ~~~~~~
| | |
| | (32) ...to here
|......
| 3714 | if (*firstp) {
| | ~~~~~~~
| | |
| | (33) dereference of NULL ‘firstp’
|
rbtdb.c: In function ‘update_recordsandxfrsize’:
rbtdb.c:6100:37: error: dereference of NULL ‘rbtversion’ [CWE-476] [-Werror=analyzer-null-dereference]
6100 | rbtversion->records += dns_rdataslab_count(hdr, hdrsize);
| ^~
‘add32’: events 1-5
|
| 6113 | add32(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, const dns_name_t *nodename,
| | ^~~~~
| | |
| | (1) entry to ‘add32’
|......
| 6151 | if (rbtversion != NULL && !loading) {
| | ~
| | |
| | (2) following ‘false’ branch...
|......
| 6164 | newheader_nx = NONEXISTENT(newheader) ? true : false;
| | ~~~~~~~~~~~~
| | |
| | (3) ...to here
|......
| 6168 | if (rbtversion == NULL && !newheader_nx) {
| | ~
| | |
| | (4) following ‘true’ branch...
| 6169 | rdtype = RBTDB_RDATATYPE_BASE(newheader->type);
| | ~~~~~~
| | |
| | (5) ...to here
|
‘add32’: events 6-7
|
| 6187 | topheader != NULL;
| | ^
| | |
| | (6) following ‘false’ branch (when ‘topheader’ is NULL)...
|......
| 6192 | goto find_header;
| | ~~~~
| | |
| | (7) ...to here
|
‘add32’: events 8-20
|
| 6275 | while (header != NULL && IGNORE(header)) {
| | ^
| | |
| | (8) following ‘false’ branch (when ‘header’ is NULL)...
|......
| 6278 | if (header != NULL) {
| | ~~ ~
| | | |
| | | (10) following ‘false’ branch (when ‘header’ is NULL)...
| | (9) ...to here
|......
| 6584 | if (newheader_nx) {
| | ~~ ~
| | | |
| | | (12) following ‘false’ branch...
| | (11) ...to here
|......
| 6589 | idx = newheader->node->locknum;
| | ~~~
| | |
| | (13) ...to here
|......
| 6604 | } else if (RESIGN(newheader)) {
| | ~
| | |
| | (14) following ‘false’ branch...
|......
| 6614 | if (topheader != NULL) {
| | ~~ ~
| | | |
| | | (16) following ‘false’ branch (when ‘topheader’ is NULL)...
| | (15) ...to here
|......
| 6642 | newheader->next = rbtnode->data;
| | ~~~~~~~~~
| | |
| | (17) ...to here
|......
| 6648 | if (rbtversion != NULL && !newheader_nx) {
| | ~
| | |
| | (18) following ‘true’ branch...
| 6649 | update_recordsandxfrsize(true, rbtversion, newheader,
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (19) ...to here
| | (20) calling ‘update_recordsandxfrsize’ from ‘add32’
| 6650 | nodename->length);
| | ~~~~~~~~~~~~~~~~~
|
+--> ‘update_recordsandxfrsize’: event 21
|
| 6093 | update_recordsandxfrsize(bool add, rbtdb_version_t *rbtversion,
| | ^~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (21) entry to ‘update_recordsandxfrsize’
|
‘update_recordsandxfrsize’: event 22
|
|../../lib/isc/include/isc/util.h:322:26:
| 322 | #define RUNTIME_CHECK(e) assert(e)
| | ^~~~~~
| | |
| | (22) following ‘true’ branch...
../../lib/isc/include/isc/util.h:162:17: note: in expansion of macro ‘RUNTIME_CHECK’
| 162 | RUNTIME_CHECK(isc_rwlock_lock((lp), (t)) == ISC_R_SUCCESS); \
| | ^~~~~~~~~~~~~
rbtdb.c:6098:9: note: in expansion of macro ‘RWLOCK’
| 6098 | RWLOCK(&rbtversion->rwlock, isc_rwlocktype_write);
| | ^~~~~~
|
‘update_recordsandxfrsize’: event 23
|
|../../lib/isc/include/isc/util.h:164:71:
| 164 | (lp), (t), __FILE__, __LINE__)); \
| | ^
| | |
| | (23) ...to here
rbtdb.c:6098:9: note: in expansion of macro ‘RWLOCK’
| 6098 | RWLOCK(&rbtversion->rwlock, isc_rwlocktype_write);
| | ^~~~~~
|
‘update_recordsandxfrsize’: events 24-26
|
| 6099 | if (add) {
| | ^
| | |
| | (24) following ‘true’ branch (when ‘add != 0’)...
| 6100 | rbtversion->records += dns_rdataslab_count(hdr, hdrsize);
| | ~~~~~~~~~~ ~~
| | | |
| | | (26) dereference of NULL ‘rbtversion’
| | (25) ...to here
|
In file included from ../../lib/isc/include/isc/util.h:14,
from rbtdb.c:40:
rbtdb.c: In function ‘add32’:
rbtdb.c:6321:42: error: dereference of NULL ‘rbtversion’ [CWE-476] [-Werror=analyzer-null-dereference]
6321 | INSIST(rbtversion->serial >= header->serial);
| ~~~~~~~~~~^~~~~~~~
rbtdb.c:6321:25: note: in expansion of macro ‘INSIST’
6321 | INSIST(rbtversion->serial >= header->serial);
| ^~~~~~
‘add32’: events 1-8
|
| 6151 | if (rbtversion != NULL && !loading) {
| | ^
| | |
| | (1) following ‘false’ branch...
|......
| 6164 | newheader_nx = NONEXISTENT(newheader) ? true : false;
| | ~~~~~~~~~~~~
| | |
| | (2) ...to here
|......
| 6168 | if (rbtversion == NULL && !newheader_nx) {
| | ~
| | |
| | (3) following ‘true’ branch...
| 6169 | rdtype = RBTDB_RDATATYPE_BASE(newheader->type);
| | ~~~~~~
| | |
| | (4) ...to here
|......
| 6172 | if (NEGATIVE(newheader)) {
| | ~
| | |
| | (5) following ‘true’ branch...
|......
| 6176 | if (covers == dns_rdatatype_any) {
| | ~~ ~
| | | |
| | | (7) following ‘false’ branch (when ‘covers != 255’)...
| | (6) ...to here
|......
| 6198 | for (topheader = rbtnode->data; topheader != NULL;
| | ~~~
| | |
| | (8) ...to here
|
‘add32’: events 9-10
|
| 6198 | for (topheader = rbtnode->data; topheader != NULL;
| | ^
| | |
| | (9) following ‘true’ branch (when ‘topheader’ is non-NULL)...
| 6199 | topheader = topheader->next) {
| 6200 | if (topheader->type == sigtype) {
| | ~~
| | |
| | (10) ...to here
|
‘add32’: events 11-20
|
| 6275 | while (header != NULL && IGNORE(header)) {
| | ^
| | |
| | (11) following ‘false’ branch...
|......
| 6278 | if (header != NULL) {
| | ~~ ~
| | | |
| | | (13) following ‘true’ branch (when ‘header’ is non-NULL)...
| | (12) ...to here
| 6279 | header_nx = NONEXISTENT(header) ? true : false;
| | ~~~~~~~~~
| | |
| | (14) ...to here
|......
| 6284 | if (header_nx && newheader_nx) {
| | ~
| | |
| | (15) following ‘false’ branch...
|......
| 6296 | if (rbtversion == NULL && trust < header->trust &&
| | ~~ ~ ~~~~~~~~~~~~~
| | | | |
| | | | (18) ...to here
| | | (17) following ‘true’ branch (when ‘rbtversion’ is NULL)...
| | (16) ...to here
|......
| 6319 | if (merge) {
| | ~
| | |
| | (19) following ‘true’ branch (when ‘merge != 0’)...
| 6320 | unsigned int flags = 0;
| | ~~~~~~~~
| | |
| | (20) ...to here
|
‘add32’: event 21
|
| 6321 | INSIST(rbtversion->serial >= header->serial);
| | ~~~~~~~~~~^~~~~~~~
| | |
| | (21) dereference of NULL ‘rbtversion’
rbtdb.c:6321:25: note: in expansion of macro ‘INSIST’
| 6321 | INSIST(rbtversion->serial >= header->serial);
| | ^~~~~~
|
```June 2021 (9.11.33, 9.11.33-S1, 9.16.17/9.16.18, 9.16.17-S1/9.16.18-S1, 9.17.14/9.17.15)https://gitlab.isc.org/isc-projects/bind9/-/issues/2701gcc-10+ -fanalyzer reports: dereference of NULL ‘label’ in lib/dns/name.c:11672021-05-18T06:46:15ZOndřej Surýgcc-10+ -fanalyzer reports: dereference of NULL ‘label’ in lib/dns/name.c:1167Full report:
```
name.c: In function ‘dns_name_fromtext’:
name.c:1167:40: error: dereference of NULL ‘label’ [CWE-476] [-Werror=analyzer-null-dereference]
1167 | *label = count;
| ...Full report:
```
name.c: In function ‘dns_name_fromtext’:
name.c:1167:40: error: dereference of NULL ‘label’ [CWE-476] [-Werror=analyzer-null-dereference]
1167 | *label = count;
| ~~~~~~~^~~~~~~
‘dns_name_fromstring’: events 1-2
|
| 2429 | dns_name_fromstring(dns_name_t *target, const char *src, unsigned int options,
| | ^~~~~~~~~~~~~~~~~~~
| | |
| | (1) entry to ‘dns_name_fromstring’
| 2430 | isc_mem_t *mctx) {
| 2431 | return (dns_name_fromstring2(target, src, dns_rootname, options, mctx));
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (2) calling ‘dns_name_fromstring2’ from ‘dns_name_fromstring’
|
+--> ‘dns_name_fromstring2’: event 3
|
| 2435 | dns_name_fromstring2(dns_name_t *target, const char *src,
| | ^~~~~~~~~~~~~~~~~~~~
| | |
| | (3) entry to ‘dns_name_fromstring2’
|
‘dns_name_fromstring2’: event 4
|
|../../lib/isc/include/isc/util.h:287:20:
| 287 | #define REQUIRE(e) assert(e)
| | ^~~~~~
| | |
| | (4) following ‘true’ branch (when ‘src’ is non-NULL)...
name.c:2443:9: note: in expansion of macro ‘REQUIRE’
| 2443 | REQUIRE(src != NULL);
| | ^~~~~~~
|
‘dns_name_fromstring2’: event 5
|
|../../lib/isc/include/isc/buffer.h:1051:9:
| 1051 | do { \
| | ^~
| | |
| | (5) ...to here
name.c:2445:9: note: in expansion of macro ‘isc_buffer_constinit’
| 2445 | isc_buffer_constinit(&buf, src, strlen(src));
| | ^~~~~~~~~~~~~~~~~~~~
|
‘dns_name_fromstring2’: event 6
|
| 2453 | result = dns_name_fromtext(name, &buf, origin, options, NULL);
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (6) calling ‘dns_name_fromtext’ from ‘dns_name_fromstring2’
|
+--> ‘dns_name_fromtext’: event 7
|
| 1057 | dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
| | ^~~~~~~~~~~~~~~~~
| | |
| | (7) entry to ‘dns_name_fromtext’
|
‘dns_name_fromtext’: event 8
|
|../../lib/isc/include/isc/util.h:287:20:
| 287 | #define REQUIRE(e) assert(e)
| | ^~~~~~
| | |
| | (8) following ‘true’ branch...
name.c:1082:9: note: in expansion of macro ‘REQUIRE’
| 1082 | REQUIRE(VALID_NAME(name));
| | ^~~~~~~
|
‘dns_name_fromtext’: event 9
|
|../../lib/isc/include/isc/util.h:287:20:
| 287 | #define REQUIRE(e) assert(e)
| | ^~~~~~
| | |
| | (9) ...to here
name.c:1083:9: note: in expansion of macro ‘REQUIRE’
| 1083 | REQUIRE(ISC_BUFFER_VALID(source));
| | ^~~~~~~
|
‘dns_name_fromtext’: event 10
|
|../../lib/isc/include/isc/util.h:287:20:
| 287 | #define REQUIRE(e) assert(e)
| | ^~~~~~
| | |
| | (10) following ‘true’ branch...
name.c:1083:9: note: in expansion of macro ‘REQUIRE’
| 1083 | REQUIRE(ISC_BUFFER_VALID(source));
| | ^~~~~~~
|
‘dns_name_fromtext’: event 11
|
|../../lib/isc/include/isc/util.h:287:20:
| 287 | #define REQUIRE(e) assert(e)
| | ^~~~~~
| | |
| | (11) ...to here
name.c:1084:9: note: in expansion of macro ‘REQUIRE’
| 1084 | REQUIRE((target != NULL && ISC_BUFFER_VALID(target)) ||
| | ^~~~~~~
|
‘dns_name_fromtext’: event 12
|
|../../lib/isc/include/isc/util.h:287:20:
| 287 | #define REQUIRE(e) assert(e)
| | ^~~~~~
| | |
| | (12) following ‘false’ branch (when ‘target’ is NULL)...
name.c:1084:9: note: in expansion of macro ‘REQUIRE’
| 1084 | REQUIRE((target != NULL && ISC_BUFFER_VALID(target)) ||
| | ^~~~~~~
|
‘dns_name_fromtext’: event 13
|
| 1084 | REQUIRE((target != NULL && ISC_BUFFER_VALID(target)) ||
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
| | |
| | (13) ...to here
| 1085 | (target == NULL && ISC_BUFFER_VALID(name->buffer)));
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
name.c:1084:9: note: in expansion of macro ‘REQUIRE’
| 1084 | REQUIRE((target != NULL && ISC_BUFFER_VALID(target)) ||
| | ^~~~~~~
|
‘dns_name_fromtext’: event 14
|
| 1084 | REQUIRE((target != NULL && ISC_BUFFER_VALID(target)) ||
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
| | |
| | (14) following ‘true’ branch...
| 1085 | (target == NULL && ISC_BUFFER_VALID(name->buffer)));
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
name.c:1084:9: note: in expansion of macro ‘REQUIRE’
| 1084 | REQUIRE((target != NULL && ISC_BUFFER_VALID(target)) ||
| | ^~~~~~~
|
‘dns_name_fromtext’: events 15-17
|
| 1087 | downcase = ((options & DNS_NAME_DOWNCASE) != 0);
| | ^~~~~~~~
| | |
| | (15) ...to here
| 1088 |
| 1089 | if (target == NULL && name->buffer != NULL) {
| | ~
| | |
| | (16) following ‘true’ branch...
| 1090 | target = name->buffer;
| | ~~~~~~
| | |
| | (17) ...to here
|
‘dns_name_fromtext’: event 18
|
|../../lib/isc/include/isc/util.h:287:20:
| 287 | #define REQUIRE(e) assert(e)
| | ^~~~~~
| | |
| | (18) following ‘true’ branch...
name.c:1094:9: note: in expansion of macro ‘REQUIRE’
| 1094 | REQUIRE(BINDABLE(name));
| | ^~~~~~~
|
‘dns_name_fromtext’: event 19
|
| 96 | if ((name)->offsets != NULL) \
| | ^~
| | |
| | (19) ...to here
name.c:1096:9: note: in expansion of macro ‘INIT_OFFSETS’
| 1096 | INIT_OFFSETS(name, offsets, odata);
| | ^~~~~~~~~~~~
|
‘dns_name_fromtext’: events 20-26
|
| 1120 | while (nrem > 0 && tlen > 0 && !done) {
| | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
| | |
| | (20) following ‘true’ branch...
| | (21) ...to here
| | (22) following ‘false’ branch (when ‘done == 0’)...
| 1121 | c = *tdata++;
| | ~
| | |
| | (23) ...to here
|......
| 1125 | switch (state) {
| | ~~~~~~
| | |
| | (24) following ‘case 0:’ branch...
| 1126 | case ft_init:
| | ~~~~
| | |
| | (25) ...to here
|......
| 1141 | if (c == '@' && tlen == 0) {
| | ~
| | |
| | (26) following ‘true’ branch...
|
‘dns_name_fromtext’: event 27
|
|cc1:
| (27): ...to here
|
‘dns_name_fromtext’: events 28-42
|
|
```June 2021 (9.11.33, 9.11.33-S1, 9.16.17/9.16.18, 9.16.17-S1/9.16.18-S1, 9.17.14/9.17.15)