]> git.ipfire.org Git - thirdparty/unbound.git/log
thirdparty/unbound.git
5 years agoChanged log lock from 'quick' to 'basic' because this is an I/O lock. 124/head
Renaud Métrich [Tue, 26 Nov 2019 15:32:03 +0000 (16:32 +0100)] 
Changed log lock from 'quick' to 'basic' because this is an I/O lock.

We cannot use a 'quick' lock (i.e. lock spinning on the CPU) for the log
lock because it can wait a lot on I/Os. Using a 'quick' lock leads to
eating the CPU for no good reason.

Example of 'pidstat' output when using various locks for log_lock:

- 'quick' lock and slow log file system (tail -f on the log file on XFS on RHEL 8)

04:15:11 PM   UID      TGID       TID    %usr %system    %CPU CPU  Command
04:15:21 PM   998     16431         -  100.00    4.20  100.00   2  unbound
04:15:21 PM   998         -     16431   31.00    1.00   32.00   2  |__unbound
04:15:21 PM   998         -     16432   31.30    0.80   32.10   0  |__unbound
04:15:21 PM   998         -     16433   30.20    1.40   31.60   1  |__unbound
04:15:21 PM   998         -     16434   30.70    1.00   31.70   3  |__unbound

- 'quick' lock and log file system being fast

04:15:40 PM   UID      TGID       TID    %usr %system   %CPU CPU  Command
04:15:50 PM   998     16431         -   10.00    1.60  11.60   1  unbound
04:15:50 PM   998         -     16431    2.50    0.50   3.00   1  |__unbound
04:15:50 PM   998         -     16432    2.30    0.40   2.70   3  |__unbound
04:15:50 PM   998         -     16433    2.70    0.30   3.00   0  |__unbound
04:15:50 PM   998         -     16434    2.60    0.40   3.00   2  |__unbound

- 'basic' lock (this commit) and slow log file system (tail -f on the log file on XFS on RHEL 8)

04:29:48 PM   UID      TGID       TID    %usr %system   %CPU CPU  Command
04:29:58 PM   998     11632         -    7.10   14.10  21.20   3  unbound
04:29:58 PM   998         -     11632    1.70    3.20   4.90   3  |__unbound
04:29:58 PM   998         -     11633    1.60    3.30   4.90   1  |__unbound
04:29:58 PM   998         -     11634    2.00    4.10   6.10   1  |__unbound
04:29:58 PM   998         -     11635    1.90    3.50   5.40   1  |__unbound

We can see in the above example, when 'basic' lock is used, that CPU
isn't consumed when log file system is slow.

Another reproducer scenario: put the log file on a NFS share with 'sync'
option.

5 years ago- Add make distclean that removes everything configure produced,
W.C.A. Wijngaards [Fri, 22 Nov 2019 14:10:02 +0000 (15:10 +0100)] 
- Add make distclean that removes everything configure produced,
  and make maintainer-clean that removes bison and flex output.

5 years agoFix compiler warnings.
George Thessalonikefs [Fri, 22 Nov 2019 13:30:56 +0000 (14:30 +0100)] 
Fix compiler warnings.

5 years ago- Fix dname loop maximum, reported by Eric Sesterhenn from X41 D-Sec.
W.C.A. Wijngaards [Fri, 22 Nov 2019 13:23:00 +0000 (14:23 +0100)] 
- Fix dname loop maximum, reported by Eric Sesterhenn from X41 D-Sec.

5 years ago- Fix comments for doxygen in dns64.
W.C.A. Wijngaards [Wed, 20 Nov 2019 14:22:20 +0000 (15:22 +0100)] 
- Fix comments for doxygen in dns64.

5 years ago- Fix python examples/calc.py for eval, reported by X41 D-Sec.
W.C.A. Wijngaards [Wed, 20 Nov 2019 14:07:09 +0000 (15:07 +0100)] 
- Fix python examples/calc.py for eval, reported by X41 D-Sec.

5 years ago- Fix Bad Randomness in Seed, reported by X41 D-Sec.
W.C.A. Wijngaards [Wed, 20 Nov 2019 13:40:50 +0000 (14:40 +0100)] 
- Fix Bad Randomness in Seed, reported by X41 D-Sec.

5 years ago- Fix NULL Pointer Dereference via Control Port,
W.C.A. Wijngaards [Wed, 20 Nov 2019 13:37:13 +0000 (14:37 +0100)] 
- Fix NULL Pointer Dereference via Control Port,
  reported by X41 D-Sec.

5 years agoReview fix of space.
W.C.A. Wijngaards [Wed, 20 Nov 2019 13:24:31 +0000 (14:24 +0100)] 
Review fix of space.

5 years ago- Fix Enum Name not Used, reported by X41 D-Sec.
W.C.A. Wijngaards [Wed, 20 Nov 2019 13:22:06 +0000 (14:22 +0100)] 
- Fix Enum Name not Used, reported by X41 D-Sec.

5 years ago- Fix Unrequired Checks, reported by X41 D-Sec.
W.C.A. Wijngaards [Wed, 20 Nov 2019 13:05:54 +0000 (14:05 +0100)] 
- Fix Unrequired Checks, reported by X41 D-Sec.

5 years ago- Fix Useless memset() in validator, reported by X41 D-Sec.
W.C.A. Wijngaards [Wed, 20 Nov 2019 13:02:58 +0000 (14:02 +0100)] 
- Fix Useless memset() in validator, reported by X41 D-Sec.

5 years ago- Fix Terminating Quotes not Written, reported by X41 D-Sec.
W.C.A. Wijngaards [Wed, 20 Nov 2019 13:01:01 +0000 (14:01 +0100)] 
- Fix Terminating Quotes not Written, reported by X41 D-Sec.

5 years ago- Fix compile with --enable-alloc-checks, reported by X41 D-Sec.
W.C.A. Wijngaards [Wed, 20 Nov 2019 12:51:10 +0000 (13:51 +0100)] 
- Fix compile with --enable-alloc-checks, reported by X41 D-Sec.

5 years ago- Fixed Compat Code Diverging from Upstream, reported by X41 D-Sec.
W.C.A. Wijngaards [Wed, 20 Nov 2019 12:30:27 +0000 (13:30 +0100)] 
- Fixed Compat Code Diverging from Upstream, reported by X41 D-Sec.

5 years ago- Changes to compat/getentropy files for,
W.C.A. Wijngaards [Wed, 20 Nov 2019 12:28:49 +0000 (13:28 +0100)] 
- Changes to compat/getentropy files for,
  no link to openssl if using nettle, and hence config.h for
  HAVE_NETTLE variable.
  compat definition of MAP_ANON, for older systems.
  ifdef stdint.h inclusion for older systems.
  ifdef sha2.h inclusion for older systems.

5 years ago- Upgrade compat/getentropy_osx.c to version 1.12 from OpenBSD.
W.C.A. Wijngaards [Wed, 20 Nov 2019 12:12:36 +0000 (13:12 +0100)] 
- Upgrade compat/getentropy_osx.c to version 1.12 from OpenBSD.

5 years ago- Upgrade compat/getentropy_solaris.c to version 1.13 from OpenBSD.
W.C.A. Wijngaards [Wed, 20 Nov 2019 12:11:05 +0000 (13:11 +0100)] 
- Upgrade compat/getentropy_solaris.c to version 1.13 from OpenBSD.

5 years ago- Synchronize compat/getentropy_win.c with version 1.5 from
W.C.A. Wijngaards [Wed, 20 Nov 2019 12:08:43 +0000 (13:08 +0100)] 
- Synchronize compat/getentropy_win.c with version 1.5 from
  OpenBSD, no changes but makes the file, comments, identical.

5 years ago- Upgrade compat/getentropy_linux.c to version 1.46 from OpenBSD.
W.C.A. Wijngaards [Wed, 20 Nov 2019 12:05:10 +0000 (13:05 +0100)] 
- Upgrade compat/getentropy_linux.c to version 1.46 from OpenBSD.

5 years ago- Fix Integer Underflow in Regional Allocator,
W.C.A. Wijngaards [Wed, 20 Nov 2019 12:00:56 +0000 (13:00 +0100)] 
- Fix Integer Underflow in Regional Allocator,
  reported by X41 D-Sec.

5 years ago- Fix Local Memory Leak in cachedb_init(),
W.C.A. Wijngaards [Wed, 20 Nov 2019 11:56:39 +0000 (12:56 +0100)] 
- Fix Local Memory Leak in cachedb_init(),
  reported by X41 D-Sec.

5 years ago- Fix Config Injection in create_unbound_ad_servers.sh,
W.C.A. Wijngaards [Wed, 20 Nov 2019 11:02:19 +0000 (12:02 +0100)] 
- Fix Config Injection in create_unbound_ad_servers.sh,
  reported by X41 D-Sec.

5 years ago- Fix Out-of-Bounds Read in dname_valid(),
W.C.A. Wijngaards [Wed, 20 Nov 2019 10:38:11 +0000 (11:38 +0100)] 
- Fix Out-of-Bounds Read in dname_valid(),
  reported by X41 D-Sec.

5 years ago- Fix Randomness Error not Handled Properly,
W.C.A. Wijngaards [Wed, 20 Nov 2019 10:35:07 +0000 (11:35 +0100)] 
- Fix Randomness Error not Handled Properly,
  reported by X41 D-Sec.

5 years ago- Fix Weak Entropy Used For Nettle,
W.C.A. Wijngaards [Wed, 20 Nov 2019 10:28:53 +0000 (11:28 +0100)] 
- Fix Weak Entropy Used For Nettle,
  reported by X41 D-Sec.

5 years ago- Adjust unbound-control to make stats_shm a read only operation.
W.C.A. Wijngaards [Wed, 20 Nov 2019 10:18:03 +0000 (11:18 +0100)] 
- Adjust unbound-control to make stats_shm a read only operation.

5 years ago- Fix Shared Memory World Writeable,
W.C.A. Wijngaards [Wed, 20 Nov 2019 10:13:45 +0000 (11:13 +0100)] 
- Fix Shared Memory World Writeable,
  reported by X41 D-Sec.

5 years ago- Fix Race Condition in autr_tp_create(),
W.C.A. Wijngaards [Wed, 20 Nov 2019 10:01:56 +0000 (11:01 +0100)] 
- Fix Race Condition in autr_tp_create(),
  reported by X41 D-Sec.

5 years ago- Fix Out of Bounds Read in rrinternal_get_owner(),
W.C.A. Wijngaards [Wed, 20 Nov 2019 07:28:12 +0000 (08:28 +0100)] 
- Fix Out of Bounds Read in rrinternal_get_owner(),
  reported by X41 D-Sec.

5 years ago- Fix Out of Bounds Write in sldns_bget_token_par(),
W.C.A. Wijngaards [Tue, 19 Nov 2019 15:54:44 +0000 (16:54 +0100)] 
- Fix Out of Bounds Write in sldns_bget_token_par(),
  reported by X41 D-Sec.

5 years ago- Fix Out of Bounds Read in sldns_str2wire_dname(),
W.C.A. Wijngaards [Tue, 19 Nov 2019 15:46:33 +0000 (16:46 +0100)] 
- Fix Out of Bounds Read in sldns_str2wire_dname(),
  reported by X41 D-Sec.

5 years ago- Fix Integer Overflow to Buffer Overflow in
W.C.A. Wijngaards [Tue, 19 Nov 2019 15:42:17 +0000 (16:42 +0100)] 
- Fix Integer Overflow to Buffer Overflow in
  sldns_str2wire_dname_buf_origin(), reported by X41 D-Sec.

5 years ago- Fix Integer Overflows in Size Calculations,
W.C.A. Wijngaards [Tue, 19 Nov 2019 15:32:40 +0000 (16:32 +0100)] 
- Fix Integer Overflows in Size Calculations,
  reported by X41 D-Sec.

5 years ago- Fix Out-of-bounds Read in rr_comment_dnskey(),
W.C.A. Wijngaards [Tue, 19 Nov 2019 15:17:06 +0000 (16:17 +0100)] 
- Fix Out-of-bounds Read in rr_comment_dnskey(),
  reported by X41 D-Sec.

5 years ago- Fix Unchecked NULL Pointer in dns64_inform_super()
W.C.A. Wijngaards [Tue, 19 Nov 2019 14:48:18 +0000 (15:48 +0100)] 
- Fix Unchecked NULL Pointer in dns64_inform_super()
  and ipsecmod_new(), reported by X41 D-Sec.

5 years ago- Fix Integer Overflow in Regional Allocator,
W.C.A. Wijngaards [Tue, 19 Nov 2019 14:38:05 +0000 (15:38 +0100)] 
- Fix Integer Overflow in Regional Allocator,
  reported by X41 D-Sec.

5 years agoCast to unsigned before comparison for assertion.
W.C.A. Wijngaards [Tue, 19 Nov 2019 14:26:57 +0000 (15:26 +0100)] 
Cast to unsigned before comparison for assertion.

5 years agoAnd check the buffer size precisely.
W.C.A. Wijngaards [Tue, 19 Nov 2019 11:11:28 +0000 (12:11 +0100)] 
And check the buffer size precisely.

5 years ago- Fixes to please lint checks.
W.C.A. Wijngaards [Tue, 19 Nov 2019 11:10:03 +0000 (12:10 +0100)] 
- Fixes to please lint checks.

5 years ago- Fix authzone printout buffer length check.
W.C.A. Wijngaards [Tue, 19 Nov 2019 09:09:44 +0000 (10:09 +0100)] 
- Fix authzone printout buffer length check.

5 years ago- 1.9.5 is 1.9.4 with bugfix, trunk is 1.9.6 in development.
W.C.A. Wijngaards [Tue, 19 Nov 2019 09:06:12 +0000 (10:06 +0100)] 
- 1.9.5 is 1.9.4 with bugfix, trunk is 1.9.6 in development.

5 years ago- Fix CVE-2019-18934, shell execution in ipsecmod.
W.C.A. Wijngaards [Tue, 19 Nov 2019 09:05:18 +0000 (10:05 +0100)] 
- Fix CVE-2019-18934, shell execution in ipsecmod.

5 years ago- gitignore .source tempfile used for compatible make.
W.C.A. Wijngaards [Mon, 18 Nov 2019 14:58:19 +0000 (15:58 +0100)] 
- gitignore .source tempfile used for compatible make.

5 years ago- Portable grep usage for reuseport configure test.
W.C.A. Wijngaards [Mon, 18 Nov 2019 14:53:47 +0000 (15:53 +0100)] 
- Portable grep usage for reuseport configure test.
- Check return type of HMAC_Init_ex for openssl 0.9.8.

5 years ago- Provide a prototype for compat malloc to remove compile warning.
W.C.A. Wijngaards [Mon, 18 Nov 2019 12:52:17 +0000 (13:52 +0100)] 
- Provide a prototype for compat malloc to remove compile warning.

5 years ago- update to bison output of 3.4.1 in code repository.
W.C.A. Wijngaards [Mon, 18 Nov 2019 09:50:54 +0000 (10:50 +0100)] 
- update to bison output of 3.4.1 in code repository.

5 years ago- In unbound-host use separate variable for get_option to please
W.C.A. Wijngaards [Mon, 18 Nov 2019 09:45:47 +0000 (10:45 +0100)] 
- In unbound-host use separate variable for get_option to please
  code checkers.

5 years ago- fixes for splint cleanliness, long vs int in SSL set_mode.
W.C.A. Wijngaards [Wed, 13 Nov 2019 14:16:27 +0000 (15:16 +0100)] 
- fixes for splint cleanliness, long vs int in SSL set_mode.

5 years ago- contrib/fastrpz.patch updated to apply for current code.
W.C.A. Wijngaards [Wed, 13 Nov 2019 10:40:56 +0000 (11:40 +0100)] 
- contrib/fastrpz.patch updated to apply for current code.

5 years ago- iana portlist updated.
W.C.A. Wijngaards [Wed, 13 Nov 2019 10:37:06 +0000 (11:37 +0100)] 
- iana portlist updated.

5 years agoChangelog note and configure autoconf generated.
W.C.A. Wijngaards [Mon, 11 Nov 2019 13:46:24 +0000 (14:46 +0100)] 
Changelog note and configure autoconf generated.
- Merge #102 from jrtc27: Add getentropy emulation for FreeBSD.

5 years agoMerge pull request #102 from jrtc27/freebsd-getentropy
Wouter Wijngaards [Mon, 11 Nov 2019 13:45:18 +0000 (14:45 +0100)] 
Merge pull request #102 from jrtc27/freebsd-getentropy

Add getentropy emulation for FreeBSD

5 years ago- Fix #109: check number of arguments for stdin-pipes in
W.C.A. Wijngaards [Mon, 11 Nov 2019 11:02:51 +0000 (12:02 +0100)] 
- Fix #109: check number of arguments for stdin-pipes in
  unbound-control and fail if too many arguments.

5 years agoAdd getentropy emulation for FreeBSD 102/head
James Clarke [Sat, 2 Nov 2019 18:08:23 +0000 (18:08 +0000)] 
Add getentropy emulation for FreeBSD

5 years ago- Fix #99: Memory leak in ub_ctx (event_base will never be freed).
W.C.A. Wijngaards [Thu, 24 Oct 2019 07:58:45 +0000 (09:58 +0200)] 
- Fix #99: Memory leak in ub_ctx (event_base will never be freed).

5 years agoAdd new configure option `--enable-fully-static` to enable full static build if
George Thessalonikefs [Wed, 23 Oct 2019 12:40:24 +0000 (14:40 +0200)] 
Add new configure option `--enable-fully-static` to enable full static build if
requested; in relation to #91.

5 years agoChangelog note for #97.
W.C.A. Wijngaards [Wed, 23 Oct 2019 05:56:17 +0000 (07:56 +0200)] 
Changelog note for #97.
- Merge #97: manpage: Add missing word on unbound.conf,
  from Erethon.

5 years agoMerge pull request #97 from Erethon/master
Wouter Wijngaards [Wed, 23 Oct 2019 05:54:57 +0000 (07:54 +0200)] 
Merge pull request #97 from Erethon/master

manpage: Add missing word on unbound.conf

5 years agomanpage: Add missing word on unbound.conf 97/head
Dionysis Grigoropoulos [Tue, 22 Oct 2019 21:35:49 +0000 (00:35 +0300)] 
manpage: Add missing word on unbound.conf

5 years ago- drop-tld.diff: adds option drop-tld: yesno that drops 2 label
W.C.A. Wijngaards [Tue, 22 Oct 2019 08:32:37 +0000 (10:32 +0200)] 
- drop-tld.diff: adds option drop-tld: yesno that drops 2 label
  queries, to stop random floods.  Apply with
  patch -p1 < contrib/drop-tld.diff and compile.
  From Saksham Manchanda (Secure64).  Please note that we think this
  will drop DNSKEY and DS lookups for tlds and hence break DNSSEC
  lookups for downstream clients.

5 years ago- Add doxygen comments to unbound-anchor source address code, in #86.
W.C.A. Wijngaards [Mon, 7 Oct 2019 07:50:04 +0000 (09:50 +0200)] 
- Add doxygen comments to unbound-anchor source address code, in #86.

5 years agoFor #86, note credit for Lukas Wunner.
W.C.A. Wijngaards [Thu, 3 Oct 2019 14:29:45 +0000 (16:29 +0200)] 
For #86, note credit for Lukas Wunner.

5 years agoChangelog entry for #86 and whitespace fix.
W.C.A. Wijngaards [Thu, 3 Oct 2019 14:22:42 +0000 (16:22 +0200)] 
Changelog entry for #86 and whitespace fix.
- Merge #86 from psquarejho: Added -b source address option to
  smallapp/unbound-anchor.c.

5 years agoMerge pull request #86 from psquarejho/master
Wouter Wijngaards [Thu, 3 Oct 2019 14:19:58 +0000 (16:19 +0200)] 
Merge pull request #86 from psquarejho/master

Added -b / source address option to smallapp/unbound-anchor.c

5 years ago- Merge 1.9.4 release with fix for vulnerability CVE-2019-16866.
W.C.A. Wijngaards [Thu, 3 Oct 2019 09:40:13 +0000 (11:40 +0200)] 
- Merge 1.9.4 release with fix for vulnerability CVE-2019-16866.
- Continue with development of 1.9.5.

5 years agoMerge remote-tracking branch 'origin/branch-1.9.4'
W.C.A. Wijngaards [Thu, 3 Oct 2019 09:37:22 +0000 (11:37 +0200)] 
Merge remote-tracking branch 'origin/branch-1.9.4'

5 years agoBranch 1.9.4 prepares for 1.9.4 release from 1.9.3 release-1.9.4
W.C.A. Wijngaards [Thu, 3 Oct 2019 08:34:40 +0000 (10:34 +0200)] 
Branch 1.9.4 prepares for 1.9.4 release from 1.9.3

5 years agoChangelog entry for Merge #90.
W.C.A. Wijngaards [Thu, 3 Oct 2019 06:59:16 +0000 (08:59 +0200)] 
Changelog entry for Merge #90.
- Merge #90 from vcunat: fix build with nettle-3.5.

5 years agoMerge pull request #90 from vcunat/p/nettle-3.5
Wouter Wijngaards [Thu, 3 Oct 2019 06:58:47 +0000 (08:58 +0200)] 
Merge pull request #90 from vcunat/p/nettle-3.5

fix build with nettle-3.5

5 years agofix build with nettle-3.5 90/head
Vladimír Čunát [Wed, 2 Oct 2019 18:04:03 +0000 (20:04 +0200)] 
fix build with nettle-3.5

https://git.lysator.liu.se/nettle/nettle/commit/8bf4747d9

5 years agoChangelog note for #87.
W.C.A. Wijngaards [Thu, 26 Sep 2019 11:17:46 +0000 (13:17 +0200)] 
Changelog note for #87.
- Merge #87 from hardfalcon: Fix contrib/unbound.service.in,
  Drop CAP_KILL, use + prefix for ExecReload= instead.

5 years agoMerge pull request #87 from hardfalcon/patch-1
Wouter Wijngaards [Thu, 26 Sep 2019 11:17:24 +0000 (13:17 +0200)] 
Merge pull request #87 from hardfalcon/patch-1

Drop CAP_KILL, use + prefix for ExecReload= instead

5 years agoDrop CAP_KILL, use + prefix for ExecReload= instead 87/head
Pascal Ernster [Thu, 26 Sep 2019 08:41:37 +0000 (08:41 +0000)] 
Drop CAP_KILL, use + prefix for ExecReload= instead

CAP_KILL seems a bit too much privileges for the sole purpose of being able to make ExecReload= work.
Use the + prefix on ExecReload= instead to run "/bin/kill -HUP $MAINPID" with full privileges, ignoring the restrictions from CapabilityBoundingSet=.

See https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecStart= for further details about the + prefix in ExecReload=.

5 years ago- The unbound.conf includes are sorted ascending, for include
W.C.A. Wijngaards [Wed, 25 Sep 2019 14:50:30 +0000 (16:50 +0200)] 
- The unbound.conf includes are sorted ascending, for include
  statements with a '*' from glob.

5 years agoAdded -b / source address option to smallapp/unbound-anchor.c 86/head
Jens Hoffrichter [Tue, 24 Sep 2019 14:42:36 +0000 (14:42 +0000)] 
Added -b / source address option to smallapp/unbound-anchor.c

5 years agoChangelog entry for fix #84 and #85.
W.C.A. Wijngaards [Mon, 23 Sep 2019 07:20:12 +0000 (09:20 +0200)] 
Changelog entry for fix #84 and #85.
- Merge #85 for #84 from sam-lunt: Add kill capability to systemd
  service file to fix that systemctl reload fails.

5 years agoMerge pull request #85 from sam-lunt/add-cap-kill
Wouter Wijngaards [Mon, 23 Sep 2019 07:18:36 +0000 (09:18 +0200)] 
Merge pull request #85 from sam-lunt/add-cap-kill

Add kill capability to systemd service file

5 years agoAdd kill capability to systemd service file 85/head
sam-lunt [Sat, 21 Sep 2019 19:36:12 +0000 (14:36 -0500)] 
Add kill capability to systemd service file

The ExecReload command calls kills on a process owned by the unbound user (or whatever user is configured). To do so, it needs the CAP_KILL capability.

5 years agoChangelog entry for #83
W.C.A. Wijngaards [Fri, 20 Sep 2019 10:59:41 +0000 (12:59 +0200)] 
Changelog entry for #83
- Merge #83 from Maryse47: contrib/unbound.service.in: do not fork
  into the background.

5 years agoMerge pull request #83 from Maryse47/nofork
Wouter Wijngaards [Fri, 20 Sep 2019 10:59:21 +0000 (12:59 +0200)] 
Merge pull request #83 from Maryse47/nofork

unbound.service.in: do not fork into the background

5 years agounbound.service.in: do not fork into the background 83/head
Maryse47 [Fri, 20 Sep 2019 10:07:37 +0000 (10:07 +0000)] 
unbound.service.in: do not fork into the background

This is needed when unbound config doesn't set "do-daemonize: no" by itself otherwise starting service fails with:
 systemd[1]: unbound.service: Got notification message from PID <PID>, but reception only permitted for main PID which is currently not known

https://github.com/NLnetLabs/unbound/blob/release-1.9.3/doc/example.conf.in#L236

5 years agoChangelog entry for #81.
W.C.A. Wijngaards [Fri, 20 Sep 2019 05:44:43 +0000 (07:44 +0200)] 
Changelog entry for #81.
- Merge #81 from Maryse47: Consistently use /dev/urandom instead
  of /dev/random in scripts and docs.

5 years agoMerge pull request #81 from Maryse47/urandom
Wouter Wijngaards [Fri, 20 Sep 2019 05:44:22 +0000 (07:44 +0200)] 
Merge pull request #81 from Maryse47/urandom

Consistently use /dev/urandom instead of /dev/random in scripts and docs

5 years ago(Changelog entry for #82).
W.C.A. Wijngaards [Fri, 20 Sep 2019 05:38:34 +0000 (07:38 +0200)] 
(Changelog entry for #82).
- Merge #82 from hardfalcon: Downgrade CAP_NET_ADMIN to CAP_NET_RAW
  in unbound.service.

5 years agoMerge pull request #82 from hardfalcon/patch-1
Wouter Wijngaards [Fri, 20 Sep 2019 05:37:32 +0000 (07:37 +0200)] 
Merge pull request #82 from hardfalcon/patch-1

Downgrade CAP_NET_ADMIN to CAP_NET_RAW in unbound.service

5 years agoDowngrade CAP_NET_ADMIN to CAP_NET_RAW in unbound.service 82/head
Pascal Ernster [Fri, 20 Sep 2019 04:47:56 +0000 (04:47 +0000)] 
Downgrade CAP_NET_ADMIN to CAP_NET_RAW in unbound.service

Since kernel 3.2, CAP_NET_RAW instead of CAP_NET_ADMIN is sufficient to allow for the usage of the IP_TRANSPARENT socket option. CAP_NET_ADMIN allows far more mayhem then CAP_NET_RAW, so prefer the safer, more restrictive solution.

5 years agoConsistently use /dev/urandom instead of /dev/random in scripts and docs 81/head
Maryse47 [Thu, 19 Sep 2019 15:35:30 +0000 (17:35 +0200)] 
Consistently use /dev/urandom instead of /dev/random in scripts and docs

Unbound code call /dev/urandom (see below)  but various docs and scripts
mention /dev/random which may be confusing.

https://github.com/NLnetLabs/unbound/blob/release-1.9.3/compat/arc4random.c#L107
https://github.com/NLnetLabs/unbound/blob/release-1.9.3/compat/getentropy_linux.c#L251
https://github.com/NLnetLabs/unbound/blob/release-1.9.3/compat/getentropy_osx.c
https://github.com/NLnetLabs/unbound/blob/release-1.9.3/compat/getentropy_solaris.c#L116

5 years ago- Merge #80 from stasic: Improve wording in man page.
W.C.A. Wijngaards [Thu, 19 Sep 2019 14:56:14 +0000 (16:56 +0200)] 
- Merge #80 from stasic: Improve wording in man page.
(Changelog entry for merge)

5 years agoMerge pull request #80 from stasic/patch-1
Wouter Wijngaards [Thu, 19 Sep 2019 14:54:42 +0000 (16:54 +0200)] 
Merge pull request #80 from stasic/patch-1

Improve wording in man page

5 years agoImprove wording in man page 80/head
Arsen Stasic [Thu, 19 Sep 2019 14:51:54 +0000 (14:51 +0000)] 
Improve wording in man page

Make it more consistent throughout the man page.
If a config option can either be *yes* or *no* use exact these terms and not something like *on* which could be easily read as *no*.

5 years ago- Fix wrong response ttl for prepended short CNAME ttls, this would
W.C.A. Wijngaards [Thu, 19 Sep 2019 14:29:51 +0000 (16:29 +0200)] 
- Fix wrong response ttl for prepended short CNAME ttls, this would
  create a wrong zero_ttl response count with serve-expired enabled.

5 years ago- Fix for oss-fuzz build warning.
W.C.A. Wijngaards [Thu, 19 Sep 2019 08:09:49 +0000 (10:09 +0200)] 
- Fix for oss-fuzz build warning.

5 years ago- Fix fix for #78 to also free service callback struct.
W.C.A. Wijngaards [Thu, 19 Sep 2019 08:03:47 +0000 (10:03 +0200)] 
- Fix fix for #78 to also free service callback struct.

5 years ago- oss-fuzz badge on README.md.
W.C.A. Wijngaards [Thu, 19 Sep 2019 07:55:23 +0000 (09:55 +0200)] 
- oss-fuzz badge on README.md.

5 years ago- Merge pull request #76 from Maryse47: Improvements and fixes for
W.C.A. Wijngaards [Thu, 19 Sep 2019 07:53:21 +0000 (09:53 +0200)] 
- Merge pull request #76 from Maryse47: Improvements and fixes for
  systemd unbound.service.
(Changelog note for merge of #76).

5 years agoMerge pull request #76 from Maryse47/patch-1
Wouter Wijngaards [Thu, 19 Sep 2019 07:52:30 +0000 (09:52 +0200)] 
Merge pull request #76 from Maryse47/patch-1

Improvements and fixes for systemd unbound.service

5 years ago- Fix #78: Memory leak in outside_network.c.
W.C.A. Wijngaards [Thu, 19 Sep 2019 07:11:23 +0000 (09:11 +0200)] 
- Fix #78: Memory leak in outside_network.c.

5 years agoImprovements and fixes for systemd unbound.service 76/head
Maryse47 [Tue, 17 Sep 2019 10:00:08 +0000 (10:00 +0000)] 
Improvements and fixes for systemd unbound.service

1. Remove `ProtectKernelTunables=true`: This prevents various with socket options from working as shown below.
`unbound[] warning: so-rcvbuf 1048576 was not granted. Got 425984. To fix: start with root permissions(linux) or sysctl bigger net.core.rmem_max(linux) or kern.ipc.maxsockbuf(bsd) values.`

2. Add `CAP_NET_ADMIN` to available caps which is needed for `ip-transparent: yes` config option to work as shown below.
`unbound[] warning: setsockopt(.. IP_TRANSPARENT ..) failed: Operation not permitted`

3. Make `ReadWritePaths` less permissive: `UNBOUND_SYSCONF_DIR` equals to `sysconfdir` which usually equals to `/etc` and `UNBOUND_LOCALSTATE_DIR` equals to `localstatedir` which usually equals to `/var`. Allowing write access for those dirs shouldn't be needed. The only dirs unbound should be allow to write to are `/run` ( for pidfile), `@UNBOUND_RUN_DIR@` (for chroot) and `@UNBOUND_CHROOT_DIR@` in case it differs from the previous one.

4. Bind-mount `/run/systemd/notify`, `UNBOUND_PIDFILE`, `/dev/log`, `/dev/urandom` in order to use them inside chroot.

5. Add few extra hardening options: `RestrictNamespaces`, `LockPersonality` and `RestrictSUIDSGID` should be safe to use.

5 years ago- Use explicit bzero for wiping clear buffer of hash in cachedb,
W.C.A. Wijngaards [Wed, 11 Sep 2019 13:31:03 +0000 (15:31 +0200)] 
- Use explicit bzero for wiping clear buffer of hash in cachedb,
  reported by Eric Sesterhenn from X41 D-Sec.