Commit Graph

797 Commits

Author SHA1 Message Date
Yorgos Thessalonikefs
c36ce2a390 - Fix alloc-size and calloc-transposed-args compiler warnings. 2024-09-06 16:01:30 +02:00
W.C.A. Wijngaards
a887284703 - Fix for #1132, comment about adjusted copy of reference check. 2024-08-30 08:56:00 +02:00
W.C.A. Wijngaards
fb198b96f1 Changelog note for #1132 and fix for #1132.
- Merge #1132: b.root renumbering.
- Fix for #1132, adjusted unit test for change in the test file.
2024-08-30 08:51:56 +02:00
W.C.A. Wijngaards
6b3266aaf8 - Fix for char signedness warnings on NetBSD. 2024-08-21 14:15:23 +02:00
Wouter Wijngaards
ad21dbd1c2
Cookie secret file (#1090)
* - cookie-secret-file, define struct.

* - cookie-secret-file, add config option, create, read and delete struct.

* - cookie-secret-file, check cookie secrets for cookie validation.

* - cookie-secret-file, unbound-control add_cookie_secret, drop_cookie_secret,
  activate_cookie_secret and print_cookie_secrets.

* - cookie-secret-file, test and fix locks, renew writes a fresh cookie,
  staging cookies get a fresh cookie and spelling in error message.

* - cookie-secret-file, remove unused variable from cookie file unit test.

* Remove unshare and faketime dependencies for cookie_file test; documentation nits.

---------

Co-authored-by: Yorgos Thessalonikefs <yorgos@nlnetlabs.nl>
2024-08-02 13:32:08 +02:00
W.C.A. Wijngaards
6106528a50 - Fix testbound for alloc stats strdup in util/alloc.c. 2024-08-02 08:58:22 +02:00
W.C.A. Wijngaards
3af4e44646 - Fix dnstap wakeup, a running wakeup timer is left to expire and not
increased, a timer is started when the dtio thread is sleeping,
  the timer set disabled when the dtio thread goes to sleep, and
  after sleep the thread checks to see if there are messages to log
  immediately.
2024-07-19 16:16:02 +02:00
W.C.A. Wijngaards
3adb9c8f92 - Fix #1103: unbound 1.20.0 segmentation fault with nghttp2. 2024-07-12 16:11:29 +02:00
W.C.A. Wijngaards
bed7cc2a90 - Fix that validation reason failure that uses string print uses
separate buffer that is passed, from the scratch validation buffer.
2024-07-08 15:29:20 +02:00
W.C.A. Wijngaards
94a94fd8c8 - Fix to use modstack_init in zonemd unit test. 2024-07-03 15:49:13 +02:00
Wouter Wijngaards
92b6c2a7b9
Merge pull request #1098 from NLnetLabs/ipset-pf-support
Ipset pf support
2024-07-03 14:49:16 +02:00
W.C.A. Wijngaards
a335e601e4 ipset-pf-support, move startup and destartup to the front of the module
func block functions, modstack call deinit function names, and detect
module change when no startup functions are needed.
2024-07-03 13:53:44 +02:00
W.C.A. Wijngaards
538434186e - Fix to remove unused include from the readzone test program. 2024-07-02 09:31:34 +02:00
W.C.A. Wijngaards
65e7253d19 ipset-pf-support, simplification of code. 2024-07-02 09:08:27 +02:00
W.C.A. Wijngaards
ff653a7ef8 Call module init init again, and new function startup and destartup.
NULL can be used if the function is not used. Open shared ports during
reload. Deinit is called during reload.
2024-07-01 16:10:07 +02:00
W.C.A. Wijngaards
08050dc939 - Fix #1091: Build fails with OpenSSL >= 3.0 built with
OPENSSL_NO_DEPRECATED.
2024-06-17 12:28:45 +02:00
Yorgos Thessalonikefs
caab100207 - Enable AddressSanitizer error detection in tdir tests. 2024-05-31 12:08:43 +02:00
Yorgos Thessalonikefs
f5a2160ba3 - Fix unused variable warning on compilation with no thread support. 2024-05-27 14:56:52 +02:00
Yorgos Thessalonikefs
6f030e9672
Proper parent identification for dynamically entered local zones (#1076)
- Fix #1059: Intermittent DNS blocking failure with local-zone and
  always_nxdomain. Addition of local_zones dynamically via
  unbound-control was not finding the zone's parent correctly.
2024-05-24 15:21:40 +02:00
W.C.A. Wijngaards
5994fb3db5 - Add checklock feature verbose_locking to trace locks and unlocks. 2024-04-22 13:42:35 +02:00
W.C.A. Wijngaards
bd74a32b79 - Extended test for cachedb serve expired. 2024-04-10 13:08:23 +02:00
W.C.A. Wijngaards
b990be88ef - Add test for cachedb serve expired. 2024-04-10 12:36:21 +02:00
W.C.A. Wijngaards
56a2b564ef Merge commit '92f2a1ca690a44880f4c4fa70a4b5a4b029aaf1c' 2024-02-13 13:58:09 +01:00
W.C.A. Wijngaards
9a00877af9 Merge commit '882903f2fa800c4cb6f5e225b728e2887bb7b9ae' 2024-02-13 13:57:56 +01:00
W.C.A. Wijngaards
92f2a1ca69 - Fix CVE-2023-50868, NSEC3 closest encloser proof can exhaust CPU. 2024-02-13 13:02:43 +01:00
W.C.A. Wijngaards
882903f2fa - Fix CVE-2023-50387, DNSSEC verification complexity can be exploited to
exhaust CPU resources and stall DNS resolvers.
2024-02-13 13:02:08 +01:00
Yorgos Thessalonikefs
8517f49745 - Use the origin (DNAME) TTL for syntesized CNAMEs as per RFC 6672. 2023-12-06 23:40:01 +01:00
W.C.A. Wijngaards
197bf15402 - Fix unit test parse of origin syntax. 2023-11-09 15:26:46 +01:00
W.C.A. Wijngaards
35d0a8a843 - Fix to print detailed errors when an SSL IO routine fails via
SSL_get_error.
2023-10-19 11:17:32 +02:00
W.C.A. Wijngaards
eff3e01ec3 Merge branch 'master' into disable-edns-do 2023-10-04 13:34:47 +02:00
George Thessalonikefs
13d4504dfc - Merge #881: Generalise the proxy protocol code. 2023-10-03 14:51:50 +02:00
W.C.A. Wijngaards
4e5b0b7eec - disable-edns-do, unit test checks lookup without EDNS DO flag. 2023-09-22 11:39:39 +02:00
W.C.A. Wijngaards
6e65343895 - Fix authority zone answers for obscured DNAMEs and delegations. 2023-09-14 11:37:49 +02:00
W.C.A. Wijngaards
b1c707e551 - Fix possibly unaligned memory access. 2023-08-16 14:57:38 +02:00
George Thessalonikefs
bab5ad623c - For #762: Introduce stat counters for downstream DNS Cookies per
thread and total: num.queries_cookie_valid, num.queries_cookie_client,
  num.queries.cookie_invalid.
2023-08-08 15:19:56 +02:00
George Thessalonikefs
4ccb613396 Merge branch 'master' into features/downstream-cookies 2023-08-05 20:37:48 +02:00
George Thessalonikefs
fbc0256825 - For #762: Cleaner manpage text and uniform use of the term DNS
Cookies.
2023-08-05 20:00:37 +02:00
George Thessalonikefs
8580a74b37 - For #762: Introduce rpl testing for DNS Cookies. 2023-08-05 19:50:57 +02:00
George Thessalonikefs
702f485587 - For #762: relocate EDNS cookie code to util/edns and introduce unit
tests.
2023-08-04 14:26:08 +02:00
George Thessalonikefs
08e11284fb - For #911: Try to trim EXTRA-TEXT (and LDNS_EDE_OTHER options
altogether) before giving up on attaching EDE options.
2023-08-01 09:55:28 +02:00
George Thessalonikefs
40f446a499 - For #857: fix mixed declarations and code. 2023-07-21 14:02:01 +02:00
George Thessalonikefs
e839771ddf Merge branch 'master' of https://github.com/eaglegai/unbound into eaglegai-master 2023-07-21 12:43:47 +02:00
George Thessalonikefs
5b7faca7db For #909: Numeric truncation when parsing TYPEXX and CLASSXX representation
- Fix return values.
- Formatting nits.
2023-07-20 11:42:05 +02:00
headshog
0b131d5a31 parse sldns_get_rr_class_by_name and sldns_get_rr_type_by_name return value 0 2023-07-19 18:09:03 +03:00
Vadim Fedorenko
a197aac2f6 timeval_func: move all timeval manipulation to separate file
There are several definitions of the same functions manipulating timeval
structures. Let's move them to separate file and arrange the code
preperly.

Signed-off-by: Vadim Fedorenko <vadfed@meta.com>
2023-04-26 03:23:41 -07:00
W.C.A. Wijngaards
15a2add0f8 streamtcp, implement NOTIFY[=N] that sends a notify packet. 2023-04-26 11:57:10 +02:00
Vadim Fedorenko
648ad4db6f Linting change.
Remove config parser/lexer code as it's rebuilded every time but can
break adding new config options.
Also clean up the code base to avoid mixing actual code changes and lint
issues.

Signed-off-by: Vadim Fedorenko <vadfed@meta.com>
2023-04-25 17:05:00 -07:00
W.C.A. Wijngaards
4bcc0a0a7a streamtcp, implement IXFR=N queries, add documentation for proxy option. 2023-04-25 16:44:58 +02:00
George Thessalonikefs
b5cc8b6c59 - Generalise the proxy protocol code 2023-04-24 16:15:56 +02:00
eaglegai
184248eb0e fix memory leak in unbound-streamtcp when open_svr failed
==1927474== Memcheck, a memory error detector
==1927474== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==1927474== Using Valgrind-3.16.0 and LibVEX; rerun with -h for copyright info
==1927474== Command: unbound-streamtcp -f localhost
==1927474==
fatal: bad server specs 'localhost'
==1927474==
==1927474== HEAP SUMMARY:
==1927474==     in use at exit: 131,186 bytes in 4 blocks
==1927474==   total heap usage: 5 allocs, 1 frees, 132,210 bytes allocated
==1927474==
==1927474== 40 bytes in 1 blocks are still reachable in loss record 1 of 4
==1927474==    at 0x483F751: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==1927474==    by 0x1E0573: sldns_buffer_new (sbuffer.c:21)
==1927474==    by 0x11ECED: send_em (streamtcp.c:374)
==1927474==    by 0x11E6C1: main (streamtcp.c:585)
==1927474==
==1927474== 40 bytes in 1 blocks are still reachable in loss record 2 of 4
==1927474==    at 0x483F751: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==1927474==    by 0x1E0573: sldns_buffer_new (sbuffer.c:21)
==1927474==    by 0x11ECFA: send_em (streamtcp.c:375)
==1927474==    by 0x11E6C1: main (streamtcp.c:585)
==1927474==
==1927474== 65,553 bytes in 1 blocks are still reachable in loss record 3 of 4
==1927474==    at 0x483F751: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==1927474==    by 0x1E0583: sldns_buffer_new (sbuffer.c:27)
==1927474==    by 0x11ECED: send_em (streamtcp.c:374)
==1927474==    by 0x11E6C1: main (streamtcp.c:585)
==1927474==
==1927474== 65,553 bytes in 1 blocks are still reachable in loss record 4 of 4
==1927474==    at 0x483F751: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==1927474==    by 0x1E0583: sldns_buffer_new (sbuffer.c:27)
==1927474==    by 0x11ECFA: send_em (streamtcp.c:375)
==1927474==    by 0x11E6C1: main (streamtcp.c:585)
==1927474==
==1927474== LEAK SUMMARY:
==1927474==    definitely lost: 0 bytes in 0 blocks
==1927474==    indirectly lost: 0 bytes in 0 blocks
==1927474==      possibly lost: 0 bytes in 0 blocks
==1927474==    still reachable: 131,186 bytes in 4 blocks
==1927474==         suppressed: 0 bytes in 0 blocks
==1927474==
==1927474== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

Signed-off-by: eaglegai <eaglegai@163.com>
2023-03-07 21:49:54 +08:00