2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00
Commit Graph

146 Commits

Author SHA1 Message Date
Ondřej Surý
9bdc24a9fd Use coccinelle to cleanup the failure handling blocks from isc_mem_strdup 2019-07-23 15:32:36 -04:00
Ondřej Surý
ae83801e2b Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
Ondřej Surý
78d0cb0a7d Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
Ondřej Surý
994e656977 Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
Ondřej Surý
cb6a185c69 Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-08 09:37:28 +02:00
Ondřej Surý
99ba29bc52 Change isc_random() to be just PRNG, and add isc_nonce_buf() that uses CSPRNG
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.
2018-05-29 22:58:21 +02:00
Evan Hunt
e324449349 remove the experimental authoritative ECS support from named
- mark the 'geoip-use-ecs' option obsolete; warn when it is used
  in named.conf
- prohibit 'ecs' ACL tags in named.conf; note that this is a fatal error
  since simply ignoring the tags could make ACLs behave unpredictably
- re-simplify the radix and iptable code
- clean up dns_acl_match(), dns_aclelement_match(), dns_acl_allowed()
  and dns_geoip_match() so they no longer take ecs options
- remove the ECS-specific unit and system test cases
- remove references to ECS from the ARM
2018-05-25 08:21:25 -07:00
Ondřej Surý
3a4f820d62 Replace all random functions with isc_random, isc_random_buf and isc_random_uniform API.
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
2018-05-16 09:54:35 +02:00
Witold Kręcicki
3687648384 libdns refactoring: get rid of two versions of dns_acl_match and dns_aclelement_match 2018-04-06 08:04:40 +02:00
Ondřej Surý
843d389661 Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
Mukund Sivaraman
7e1df5182c [master] isc_rng_randombytes()
4807.	[cleanup]	isc_rng_randombytes() returns a specified number of
			bytes from the PRNG; this is now used instead of
			calling isc_rng_random() multiple times. [RT #46230]
2017-11-06 10:44:37 -08:00
Evan Hunt
24172bd2ee [master] completed and corrected the crypto-random change
4724.	[func]		By default, BIND now uses the random number
			functions provided by the crypto library (i.e.,
			OpenSSL or a PKCS#11 provider) as a source of
			randomness rather than /dev/random.  This is
			suitable for virtual machine environments
			which have limited entropy pools and lack
			hardware random number generators.

			This can be overridden by specifying another
			entropy source via the "random-device" option
			in named.conf, or via the -r command line option;
			however, for functions requiring full cryptographic
			strength, such as DNSSEC key generation, this
			cannot be overridden. In particular, the -r
			command line option no longer has any effect on
			dnssec-keygen.

			This can be disabled by building with
			"configure --disable-crypto-rand".
			[RT #31459] [RT #46047]
2017-09-28 10:09:22 -07:00
Evan Hunt
8eb88aafee [master] add libns and remove liblwres
4708.   [cleanup]       Legacy Windows builds (i.e. for XP and earlier)
                        are no longer supported. [RT #45186]

4707.	[func]		The lightweight resolver daemon and library (lwresd
			and liblwres) have been removed. [RT #45186]

4706.	[func]		Code implementing name server query processing has
			been moved from bin/named to a new library "libns".
			Functions remaining in bin/named are now prefixed
			with "named_" rather than "ns_".  This will make it
			easier to write unit tests for name server code, or
			link name server functionality into new tools.
			[RT #45186]
2017-09-08 13:47:34 -07:00
Mark Andrews
0c27b3fe77 4401. [misc] Change LICENSE to MPL 2.0. 2016-06-27 14:56:38 +10:00
Witold Krecicki
19d80ce584 4358. [test] Added American Fuzzy Lop harness that allows
feeding fuzzed packets into BIND.
			[RT #41723]
2016-05-05 11:49:38 +02:00
Tinderbox User
53ba272721 update copyright notice / whitespace 2016-02-18 23:45:32 +00:00
Mark Andrews
a2b15b3305 4318. [security] Malformed control messages can trigger assertions
in named and rndc. (CVE-2016-1285) [RT #41666]
2016-02-18 12:11:27 +11:00
Mukund Sivaraman
58f7af60e7 Allow non-destructive control channel access using a "read-only" clause (#40498) 2015-11-11 13:46:57 +05:30
Mukund Sivaraman
9b17fd447c Limit rndc query message sizes to 32 KiB (#41073) 2015-11-11 09:56:13 +05:30
Tinderbox User
012142bbe0 update copyright notice / whitespace 2015-05-06 23:45:24 +00:00
Evan Hunt
9e804040a2 [master] add "rndc -r" to print result code
4115.	[func]		"rndc -r" now prints the result code (e.g.,
			ISC_R_SUCCESS, ISC_R_TIMEOUT, etc) after
			running the requested command. [RT #38913]
2015-05-05 16:39:09 -07:00
Evan Hunt
e32d354f75 [master] allow arbitrary-size rndc output
4005.	[func]		The buffer used for returning text from rndc
			commands is now dynamically resizable, allowing
			arbitrarily large amounts of text to be sent back
			to the client. (Prior to this change, it was
			possible for the output of "rndc tsig-list" to be
			truncated.) [RT #37731]
2014-11-14 15:58:54 -08:00
Evan Hunt
368aedf188 [master] log when using rndc.key
3767.	[func]		Log explicitly when using rndc.key to configure
			command channel. [RT #35316]
2014-02-27 17:55:04 -08:00
Tinderbox User
431a83fb29 update copyright notice 2014-01-09 23:46:35 +00:00
Evan Hunt
e851ea8260 [master] replace memcpy() with memmove().
3698.	[cleanup]	Replaced all uses of memcpy() with memmove().
			[RT #35120]
2014-01-08 16:39:05 -08:00
Evan Hunt
2c2be89824 [master] buffer could overflow in rndc zonestatus
3680.	[bug]		Ensure buffer space is available in "rndc zonestatus".
			[RT #35084]
2013-12-02 15:38:24 -08:00
Evan Hunt
4eb998928b [master] algorithm flexibility for rndc
3525.	[func]		Support for additional signing algorithms in rndc:
			hmac-sha1, -sha224, -sha256, -sha384, and -sha512.
			The -A option to rndc-confgen can be used to
			select the algorithm for the generated key.
			(The default is still hmac-md5; this may
			change in a future release.) [RT #20363]
2013-03-13 17:53:11 -07:00
Mark Andrews
3a0da183bb 3520. [bug] 'mctx' was not being referenced counted in some places
where it should have been.  [RT #32794]
2013-03-08 14:38:03 +11:00
Tinderbox User
fe43ef9e63 update copyright notice 2013-03-07 23:47:05 +00:00
Evan Hunt
c1e88f8d86 [master] fix rndc replay protection
3519.	[func]		Full replay protection via four-way handshake is
			now mandatory for rndc clients. Very old versions
			of rndc will no longer work. [RT #32798]
2013-03-07 15:14:07 -08:00
Mark Andrews
c298583db5 3337. [bug] Change #3294 broke support for the multiple keys
in controls. [RT #29694]
2012-06-13 16:25:42 +10:00
Tinderbox User
5fa46bc916 update copyright notice 2012-03-10 23:45:53 +00:00
Mark Andrews
962bf88eec 3294. [bug] isccc/cc.c:table_fromwire failed to free alist on
error. [RT #28265]
2012-03-08 14:28:26 +11:00
Mark Andrews
328e0fee6b 3254. [bug] Set isc_socket_ipv6only() on the IPv6 control channels.
[RT #22249]
2011-12-22 08:07:48 +00:00
Automatic Updater
c1aef54e14 update copyright notice 2011-03-12 04:59:49 +00:00
Mark Andrews
0874abad14 3069. [cleanup] Silence warnings messages from clang static analysis.
[RT #20256]
2011-03-11 06:11:27 +00:00
Mark Andrews
240e53b132 2396. [bug] Don't set SO_REUSEADDR for randomized ports.
[RT #18336]
part 2
2008-07-23 23:27:54 +00:00
Mark Andrews
9de0f9b0ae 2396. [bug] Don't set SO_REUSEADDR for randomized ports.
[RT #18336]
2008-07-22 03:43:04 +00:00
Automatic Updater
2f012d936b update copyright notice 2008-01-18 23:46:58 +00:00
Automatic Updater
2f99b54e8e update copyright notice 2008-01-17 23:47:00 +00:00
Mark Andrews
546c2bf791 2308. [cleanup] Silence Coverity warning in bin/named/controlconf.c.
[RT #17495]
2008-01-17 02:57:16 +00:00
Evan Hunt
c7e266b7e5 Add support for O(1) ACL processing, based on radix tree code originally
written by kevin brintnall. [RT #16288]
2007-09-12 01:09:08 +00:00
Automatic Updater
ec5347e2c7 update copyright notice 2007-06-18 23:47:57 +00:00
Mark Andrews
cdce8b88c6 update copyright notice 2007-02-14 00:27:27 +00:00
Mark Andrews
96ea716328 2134. [func] Additional statistics support. [RT #16666] 2007-02-13 02:49:08 +00:00
Mark Andrews
cfcb0881d1 2111. [bug] Fix a number of errors reported by Coverity.
[RT #16507]
2006-12-07 04:46:27 +00:00
Mark Andrews
45e1bd6358 1991. [cleanup] The configuration data, once read, should be treated
as readonly.  Expand the use of const to enforce this
                        at compile time. [RT #15813]
2006-02-28 02:39:52 +00:00
Mark Andrews
26e2a07a0b update copyright notice 2006-01-27 23:57:46 +00:00
Mark Andrews
c6d4f78152 1973. [func] TSIG HMACSHA1, HMACSHA224, HMACSHA256, HMACSHA384 and
HMACSHA512 support. [RT #13606]
2006-01-27 02:35:15 +00:00
Mark Andrews
ade83e60fa silence ambigious else 2005-11-30 03:36:45 +00:00