Commit Graph
550 Commits
Author SHA1 Message Date
Mark Andrews 7c3734f920 adjust goto target and conditional compilation so that cleanup_spillattimer and cleanup_alglock labels match the element to be cleanup and so that they are always used
(cherry picked from commit 7b27be54ee)
(cherry picked from commit 981d548a66)
2018-02-26 10:54:18 +11:00
Petr MenšíkandEvan Hunt 07b6ddd178 Reuse new function from rt46864 for similar block elsewhere.
(cherry picked from commit e7a93321f0)
(cherry picked from commit cb98ce8e67)
(cherry picked from commit 6876501605)
(cherry picked from commit 16ea60d8cc)
2018-02-23 13:57:56 -08:00
Mark Andrews b6e6160df8 use %u instead of %d 2018-02-16 18:10:41 +11:00
Tinderbox User f3e5a44f00 update copyright notice / whitespace 2018-01-04 23:47:43 +00:00
Evan Hunt f6ec7f6b99 [v9_9] block validator deadlock and prevent use-after-free
4859.	[bug]		A loop was possible when attempting to validate
			unsigned CNAME responses from secure zones;
			this caused a delay in returning SERVFAIL and
			also increased the chances of encountering
			CVE-2017-3145. [RT #46839]

4858.	[security]	Addresses could be referenced after being freed
			in resolver.c, causing an assertion failure.
			(CVE-2017-3145) [RT #46839]
2018-01-03 19:19:59 -08:00
Michał Kępień bbfa83da40 [v9_9] Refactor reclimit system test
4823.	[test]		Refactor reclimit system test to improve its
			reliability and speed. [RT #46632]

(cherry picked from commit 1fd4803e84)
2017-11-21 10:34:03 +01:00
Evan Hunt c7a13bf188 [v9_9] ignore cache when sending 5011 refresh queries
4771.	[bug]		When sending RFC 5011 refresh queries, disregard
			cached DNSKEY rrsets. [RT #46251]

(cherry picked from commit b2597ce86b)
(cherry picked from commit b8d1e3cd5d)
2017-10-11 14:37:30 -07:00
Evan Hunt ccad706f63 [v9_9] reduce unnecessary priming queries
4770.	[bug]		Cache additional data from priming queries as glue.
			Previously they were ignored as unsigned
			non-answer data from a secure zone, and never
			actually got added to the cache, causing hints
			to be used frequently for root-server
			addresses, which triggered re-priming. [RT #45241]

(cherry picked from commit 5de02a075b)
(cherry picked from commit 6216df5ccd)
(cherry picked from commit 07e25984b8)
2017-10-11 09:21:21 -07:00
Mark Andrews 4828d6c34f tcp test got reversed
(cherry picked from commit b4c31c8795)
2017-09-27 15:20:33 +10:00
Mark Andrews 80dd4971d9 4739. [cleanup] Address clang static analysis warnings. [RT #45952]
(cherry picked from commit f9f3f20d2d)
2017-09-27 13:19:37 +10:00
Evan Hunt f07825440f [master] cleanup strcat/strcpy
4722.	[cleanup]	Clean up uses of strcpy() and strcat() in favor of
			strlcpy() and strlcat() for safety. [RT #45981]

(cherry picked from commit 114f95089c)
(cherry picked from commit 7cd594b842)
(cherry picked from commit e0ddfb109e)
2017-09-13 00:20:09 -07:00
Evan Hunt 3d7439205c [v9_9] improve handling of qcount=0 replies
4717.	[bug]		Treat replies with QCOUNT=0 as truncated if TC=1,
			FORMERR if TC=0, and log the error correctly.
			[RT #45836]

(cherry picked from commit 25b33bede4)
(cherry picked from commit a2a0100e0f)
2017-09-12 15:27:55 -07:00
Mark Andrews f3ed36d3a1 4675. [cleanup] Don't use C++ keyword class. [RT #45726] 2017-08-10 08:51:22 +10:00
Mark AndrewsandMukund Sivaraman cf25cdac38 add comment
(cherry picked from commit 93049edb81)
(cherry picked from commit ef899b41f4)
2017-08-09 10:49:11 +05:30
Evan HuntandMukund Sivaraman 8d9c7ef2e2 style
(cherry picked from commit 72f91848ef)
(cherry picked from commit 164d30e3a1)
2017-08-09 10:49:10 +05:30
Mukund Sivaraman 6b230c0dd8 Fix bug where named as resolver would not try other fctx addresses upon fetch timeout (#45321)
(cherry picked from commit 88178e13e6)
2017-08-08 21:19:00 +05:30
Mukund Sivaraman 03acb6368a Fix a race in resume_dslookup() (#45168)
(cherry picked from commit c88efb83b3)
(cherry picked from commit 6e10f87913)
(cherry picked from commit 6859f1d265)
2017-08-08 13:17:22 +05:30
Mark Andrews 169bf685a1 4654. [cleanup] Don't use C++ keywords delete, new and namespace.
[RT #45538]

(cherry picked from commit 4bf32aa587)
2017-07-21 12:50:13 +10:00
Mark Andrews c43edd377b 4580. [bug] 4578 introduced a regression when handling CNAME to
referral below the current domain. [RT #44850]

(cherry picked from commit 638c7c635d)
2017-03-14 15:17:32 +11:00
Mark Andrews b99d097cc4 Reimplement:
4578.   [security]      Some chaining (CNAME or DNAME) responses to upstream
                        queries could trigger assertion failures.
                        (CVE-2017-3137) [RT #44734]

(cherry picked from commit f240f4a5de)
2017-03-01 12:07:56 +11:00
Evan Hunt fcf1874867 [v9_9] remove unnecessary INSIST and prep 9.11.1rc2
4578.	[security]	Some chaining (CNAME or DNAME) responses to upstream
			queries could trigger assertion failures.
			(CVE-2017-3137) [RT #44734]

(cherry picked from commit a1365a0042)
(cherry picked from commit 559cbe04e7)
2017-02-23 15:26:55 -08:00
Evan Hunt ad1ebb5b28 [v9_9] address portability issues
(cherry picked from commit a2bd99a959)
2017-01-30 16:52:42 -08:00
Evan Hunt a6bae6d52c [v9_9] change 4558 was incomplete
(cherry picked from commit cd668ea57f)
2017-01-30 14:11:30 -08:00
Tinderbox User 9e04eb78f1 update copyright notice / whitespace 2017-01-24 23:47:30 +00:00
Mark Andrews 0ce2803ae7 4558. [bug] Synthesised CNAME before matching DNAME was still
being cached when it should have been.  [RT #44318]

(cherry picked from commit 9f4bf43b79)
2017-01-24 17:41:27 +11:00
Mark Andrews a14b7f0187 4510. [security] Named mishandled some responses where covering RRSIG
records are returned without the requested data
                        resulting in a assertion failure. (CVE-2016-9147)
                        [RT #43548]

(cherry picked from commit 6adf421e7e)
2016-12-29 11:53:58 +11:00
Mark Andrews d372472f60 4508. [security] Named incorrectly tried to cache TKEY records which
could trigger a assertion failure when there was
                            a class mismatch. (CVE-2016-9131) [RT #43522]

(cherry picked from commit 2c1c4b99a1)
2016-12-29 11:35:54 +11:00
Mark Andrews 69cb8ebf15 4517. [security] Named could mishandle authority sections that were
missing RRSIGs triggering an assertion failure.
                        (CVE-2016-9444) [RT # 43632]

(cherry picked from commit 1df30cfd27c5a3c57fce357c54aaf6c702227d51)
2016-12-29 10:46:44 +11:00
Mark Andrews 2c74ad28ef 4530. [bug] Change 4489 broke the handling of CNAME -> DNAME
in responses resulting in SERVFAIL being returned.
                        [RT #43779]

(cherry picked from commit 60cb462c56)
2016-12-09 12:51:40 +11:00
Mark Andrews bbb7c613b3 4489. [security] It was possible to trigger assertions when processing
a response. (CVE-2016-8864) [RT #43465]

(cherry picked from commit bd6f27f5c3)
2016-10-21 14:56:32 +11:00
Mark Andrews 5ccb7b6341 4403. [bug] Rename variables and arguments that shadow: basename,
clone and gai_error.

(cherry picked from commit ecfa005085)
(cherry picked from commit c8f34dbca6)
2016-06-29 11:28:50 +10:00
Mukund Sivaraman 6439dc94d5 Log query and depth counters during fetches when querytrace is enabled (#41787)
(cherry picked from commit 275265ab27)
(cherry picked from commit 666fa20ef3)
2016-03-04 13:30:12 +05:30
Mark Andrews a7646fe8cf silence may be used when unset false positive
(cherry picked from commit c7aae79b62)
2016-02-29 11:25:16 +11:00
Mark Andrews ce3cd91cae Part 2 of:
4319.   [security]      Fix resolver assertion failure due to improper
                        DNAME handling when parsing fetch reply messages.
                        (CVE-2016-1286) [RT #41753]

(cherry picked from commit 2de89ee9de)
2016-02-29 07:17:41 +11:00
Mukund Sivaraman 76c3c9fe9f Fix resolver assertion failure due to improper DNAME handling (CVE-2016-1286) (#41753)
(cherry picked from commit 5995fec51c)
(cherry picked from commit 456e1eadd2)
2016-02-22 12:25:46 +05:30
Mark Andrews 8a550860b8 4317. [bug] Age all unused servers on fetch timeout. [RT #41597]
(cherry picked from commit d372f426ca)
2016-02-12 12:35:19 +11:00
Mark Andrews dcc3dd16f6 4293. [bug] Address memory leak on priming query creation failure.
[RT #41512]

(cherry picked from commit 73fbd4c9d3)
2016-01-20 16:39:37 +11:00
Tinderbox User 8df239e201 update copyright notice / whitespace 2016-01-05 23:46:15 +00:00
Evan Hunt f6ab9b3a28 [v9_9] fixed bogus server regression
4288.	[bug]		Fixed a regression in resolver.c:possibly_mark()
			which caused known-bogus servers to be queried
			anyway. [RT #41321]
2016-01-04 16:06:27 -08:00
Mark Andrews 9631d0769e 4260. [security] Insufficient testing when parsing a message allowed
records with an incorrect class to be be accepted,
                        triggering a REQUIRE failure when those records
                        were subsequently cached. (CVE-2015-8000) [RT #4098]

(cherry picked from commit c8821d124c)
2015-11-16 13:28:28 +11:00
Mark Andrews 65927e0eca 4253. [bug] Address fetch context reference count handling error
on socket error.  [RT#40945]

(cherry picked from commit 2f450fcd29)
2015-11-05 17:28:20 +11:00
Mark Andrews b2cb638754 4238. [bug] Don't send to servers on net zero (0.0.0.0/8).
[RT #40947]

(cherry picked from commit 6588a2b404)
2015-10-16 08:07:58 +11:00
Mark Andrews bac25ffe08 4221. [bug] Resource leak on DNS_R_NXDOMAIN in fctx_create.
[RT #40583]

(cherry picked from commit 8d80b4939d)
2015-09-25 09:19:43 +10:00
Mark Andrews 6c09fd0e6b 4193. [bug] Handle broken servers that return BADVERS incorrectly.
[RT #40427]
2015-08-25 16:55:19 +10:00
Evan Hunt 0d83784a75 [v9_9] address buffer accounting error
4168.	[security]	A buffer accounting error could trigger an
			assertion failure when parsing certain malformed
			DNSSEC keys. (CVE-2015-5722) [RT #40212]

(cherry picked from commit ce9f893e21)
2015-08-07 13:22:40 -07:00
Evan Hunt ea36796f82 [v9_9] DDoS mitigation features
3938.	[func]		Added quotas to be used in recursive resolvers
			that are under high query load for names in zones
			whose authoritative servers are nonresponsive or
			are experiencing a denial of service attack.

			- "fetches-per-server" limits the number of
			  simultaneous queries that can be sent to any
			  single authoritative server.  The configured
			  value is a starting point; it is automatically
			  adjusted downward if the server is partially or
			  completely non-responsive. The algorithm used to
			  adjust the quota can be configured via the
			  "fetch-quota-params" option.
			- "fetches-per-zone" limits the number of
			  simultaneous queries that can be sent for names
			  within a single domain.  (Note: Unlike
			  "fetches-per-server", this value is not
			  self-tuning.)
			- New stats counters have been added to count
			  queries spilled due to these quotas.

			These options are not available by default;
			use "configure --enable-fetchlimit" (or
			--enable-developer) to include them in the build.

			See the ARM for details of these options. [RT #37125]
2015-07-08 23:00:58 -07:00
Mark Andrews 1ef6de05cd 4146. [bug] Address reference leak that could prevent a clean
shutdown. [RT #37125]

(cherry picked from commit adbf81335b)
2015-06-25 18:36:58 +10:00
Evan Hunt 8d1941a8ce [v9_9] use after free in resquery_destroy()
4102.	[bug]		Fix a use after free bug introduced in change
			#4094.  [RT #39281]
2015-04-15 15:39:03 -07:00
Mukund Sivaraman 9087397f01 Don't use query->sendevent after it's been destroyed (#39132)
(cherry picked from commit 2c4d5faf7f)
(cherry picked from commit 7f2b905c81)

Conflicts:
	CHANGES
2015-04-13 15:08:40 +05:30
Evan Hunt df3550ef06 [v9_9] hold a reference on fetch context during query
4094.	[bug]		A race during shutdown or reconfiguration could
			cause an assertion in mem.c. [RT #38979]

(cherry picked from commit 2cfe85e6ee33ec97102b6e2e80c86f827bba8594)
(cherry picked from commit 4426003759850ebef210abd2fa339b57ddda3355)
2015-04-08 13:54:05 -07:00