- 25 Mar, 2020 1 commit
-
-
Ondřej Surý authored
These are mostly false positives, the clang-analyzer FAQ[1] specifies why and how to fix it: > The reason the analyzer often thinks that a pointer can be null is > because the preceding code checked compared it against null. So if you > are absolutely sure that it cannot be null, remove the preceding check > and, preferably, add an assertion as well. The 4 warnings reported are: dnssec-cds.c:781:4: warning: Access to field 'base' results in a dereference of a null pointer (loaded from variable 'buf') isc_buffer_availableregion(buf, &r); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /builds/isc-projects/bind9/lib/isc/include/isc/buffer.h:996:36: note: expanded from macro 'isc_buffer_availableregion' ^ /builds/isc-projects/bind9/lib/isc/include/isc/buffer.h:821:16: note: expanded from macro 'ISC__BUFFER_AVAILABLEREGION' (_r)->base = isc_buffer_used(_b); \ ^~~~~~~~~~~~~~~~~~~ /builds/isc-projects/bind9/lib/isc/include/isc/buffer.h:152:29: note: expanded from macro 'isc_buffer_used' ((void *)((unsigned char *)(b)->base + (b)->used)) /*d*/ ^~~~~~~~~ 1 warning generated. -- byname_test.c:308:34: warning: Access to field 'fwdtable' results in a dereference of a null pointer (loaded from variable 'view') RUNTIME_CHECK(dns_fwdtable_add(view->fwdtable, dns_rootname, ^~~~~~~~~~~~~~ /builds/isc-projects/bind9/lib/isc/include/isc/util.h:318:52: note: expanded from macro 'RUNTIME_CHECK' ^~~~ /builds/isc-projects/bind9/lib/isc/include/isc/error.h:50:21: note: expanded from macro 'ISC_ERROR_RUNTIMECHECK' ((void)(ISC_LIKELY(cond) || \ ^~~~ /builds/isc-projects/bind9/lib/isc/include/isc/likely.h:23:43: note: expanded from macro 'ISC_LIKELY' ^ 1 warning generated. -- ./rndc.c:255:6: warning: Dereference of null pointer (loaded from variable 'host') if (*host == '/') { ^~~~~ 1 warning generated. -- ./main.c:1254:9: warning: Access to field 'sctx' results in a dereference of a null pointer (loaded from variable 'named_g_server') sctx = named_g_server->sctx; ^~~~~~~~~~~~~~~~~~~~ 1 warning generated. References: 1. https://clang-analyzer.llvm.org/faq.html#null_pointer
-
- 18 Mar, 2020 1 commit
-
-
Mark Andrews authored
The isc_mem API now crashes on memory allocation failure, and this is the next commit in series to cleanup the code that could fail before, but cannot fail now, e.g. isc_result_t return type has been changed to void for the isc_log API functions that could only return ISC_R_SUCCESS.
-
- 09 Mar, 2020 1 commit
-
-
Ondřej Surý authored
-
- 27 Feb, 2020 1 commit
-
-
Evan Hunt authored
-
- 14 Feb, 2020 1 commit
-
-
Ondřej Surý authored
-
- 13 Feb, 2020 2 commits
-
-
Evan Hunt authored
-
Ondřej Surý authored
The command used to reformat the files in this commit was: ./util/run-clang-tidy \ -clang-tidy-binary clang-tidy-11 -clang-apply-replacements-binary clang-apply-replacements-11 \ -checks=-*,readability-braces-around-statements \ -j 9 \ -fix \ -format \ -style=file \ -quiet clang-format -i --style=format $(git ls-files '*.c' '*.h') uncrustify -c .uncrustify.cfg --replace --no-backup $(git ls-files '*.c' '*.h') clang-format -i --style=format $(git ls-files '*.c' '*.h')
-
- 12 Feb, 2020 1 commit
-
-
Ondřej Surý authored
-
- 03 Feb, 2020 1 commit
-
-
Ondřej Surý authored
The isc_buffer_allocate() function now cannot fail with ISC_R_MEMORY. This commit removes all the checks on the return code using the semantic patch from previous commit, as isc_buffer_allocate() now returns void.
-
- 14 Jan, 2020 1 commit
-
-
Ondřej Surý authored
-
- 03 Dec, 2019 1 commit
-
-
Ondřej Surý authored
Previously, the dns_name API used isc_thread_key API for TLS, which is fairly complicated and requires initialization of memory contexts, etc. This part of code was refactored to use a ISC_THREAD_LOCAL pointer which greatly simplifies the whole code related to storing TLS variables.
-
- 07 Nov, 2019 1 commit
-
-
Evan Hunt authored
When a task manager is created, we can now specify an `isc_nm` object to associate with it; thereafter when the task manager is placed into exclusive mode, the network manager will be paused.
-
- 25 Sep, 2019 1 commit
-
-
Ondřej Surý authored
-
- 12 Sep, 2019 1 commit
-
-
Ondřej Surý authored
-
- 23 Jul, 2019 1 commit
-
-
Ondřej Surý authored
-
- 20 May, 2019 1 commit
-
-
Ondřej Surý authored
This work cleans up the API which includes couple of things: 1. Make the isc_appctx_t type fully opaque 2. Protect all access to the isc_app_t members via stdatomics 3. sigwait() is part of POSIX.1, remove dead non-sigwait code 4. Remove unused code: isc_appctx_set{taskmgr,sockmgr,timermgr}
-
- 08 Mar, 2019 1 commit
-
-
Ondřej Surý authored
-
- 08 Aug, 2018 2 commits
-
-
Ondřej Surý authored
-
Ondřej Surý authored
-
- 19 Jul, 2018 1 commit
-
-
Ondřej Surý authored
-
- 29 May, 2018 1 commit
-
-
Ondřej Surý authored
This commit reverts the previous change to use system provided entropy, as (SYS_)getrandom is very slow on Linux because it is a syscall. The change introduced in this commit adds a new call isc_nonce_buf that uses CSPRNG from cryptographic library provider to generate secure data that can be and must be used for generating nonces. Example usage would be DNS cookies. The isc_random() API has been changed to use fast PRNG that is not cryptographically secure, but runs entirely in user space. Two contestants have been considered xoroshiro family of the functions by Villa&Blackman and PCG by O'Neill. After a consideration the xoshiro128starstar function has been used as uint32_t random number provider because it is very fast and has good enough properties for our usage pattern. The other change introduced in the commit is the more extensive usage of isc_random_uniform in places where the usage pattern was isc_random() % n to prevent modulo bias. For usage patterns where only 16 or 8 bits are needed (DNS Message ID), the isc_random() functions has been renamed to isc_random32(), and isc_random16() and isc_random8() functions have been introduced by &-ing the isc_random32() output with 0xffff and 0xff. Please note that the functions that uses stripped down bit count doesn't pass our NIST SP 800-22 based random test.
-
- 16 May, 2018 1 commit
-
-
Ondřej Surý authored
The three functions has been modeled after the arc4random family of functions, and they will always return random bytes. The isc_random family of functions internally use these CSPRNG (if available): 1. getrandom() libc call (might be available on Linux and Solaris) 2. SYS_getrandom syscall (might be available on Linux, detected at runtime) 3. arc4random(), arc4random_buf() and arc4random_uniform() (available on BSDs and Mac OS X) 4. crypto library function: 4a. RAND_bytes in case OpenSSL 4b. pkcs_C_GenerateRandom() in case PKCS#11 library
-
- 11 May, 2018 1 commit
-
-
Ondřej Surý authored
-
- 23 Feb, 2018 1 commit
-
-
Ondřej Surý authored
-
- 18 Jan, 2018 2 commits
-
-
Tinderbox User authored
-
Evan Hunt authored
4867. [cleanup] Normalize rndc on/off commands (validation, querylog, serve-stale) so they all accept the same synonyms for on/off (yes/no, true/false, enable/disable). Thanks to Tony Finch. [RT #47022]
-
- 01 Dec, 2017 1 commit
-
-
Ondřej Surý authored
-
- 05 Sep, 2017 1 commit
-
-
Mark Andrews authored
allows named to provide stale cached answers when the authoritative server is under attack. See max-stale-ttl, stale-answer-enable, stale-answer-ttl. [RT #44790]
-
- 29 Aug, 2017 1 commit
-
-
Michał Kępień authored
4691. [func] Add -4/-6 command line options to nsupdate and rndc. [RT #45632]
-
- 05 Jan, 2017 1 commit
-
-
Tinderbox User authored
-
- 04 Jan, 2017 1 commit
-
-
Evan Hunt authored
4549. [func] Added support for the EDNS TCP Keepalive option (RFC 7828). [RT #42126] 4548. [func] Added support for the EDNS Padding option (RFC 7830). [RT #42094]
-
- 28 Sep, 2016 1 commit
-
-
Evan Hunt authored
Patch submitted by Tony Finch (dot@dotat.at).
-
- 23 Aug, 2016 1 commit
-
-
Mark Andrews authored
-
- 18 Aug, 2016 1 commit
-
-
Mark Andrews authored
the specific PKCS11 providers capabilities. [RT #42458]
-
- 15 Aug, 2016 1 commit
-
-
Mark Andrews authored
-
- 27 Jun, 2016 1 commit
-
-
Mark Andrews authored
-
- 18 Feb, 2016 2 commits
-
-
Tinderbox User authored
-
Mark Andrews authored
in named and rndc. (CVE-2016-1285) [RT #41666]
-
- 27 Aug, 2015 1 commit
-
-
Evan Hunt authored
-
- 21 Jul, 2015 1 commit
-
-
Mukund Sivaraman authored
Squashed commit of the following: commit 73f0bba7d8d4763763ff88731c739ac646714ac8 Author: Mukund Sivaraman <muks@isc.org> Date: Mon Jul 13 05:40:35 2015 +0530 Update rndc usage output This is based on a patch sent by Tony Finch.
-