Commit graph

6058 commits

Author SHA1 Message Date
W.C.A. Wijngaards
7963c9f463 Changelog note for #87.
- Merge #87 from hardfalcon: Fix contrib/unbound.service.in,
  Drop CAP_KILL, use + prefix for ExecReload= instead.
2019-09-26 13:17:46 +02:00
Wouter Wijngaards
710851e69a
Merge pull request #87 from hardfalcon/patch-1
Drop CAP_KILL, use + prefix for ExecReload= instead
2019-09-26 13:17:24 +02:00
Pascal Ernster
11f22074a9
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=.
2019-09-26 08:41:37 +00:00
W.C.A. Wijngaards
55bb4c1275 - The unbound.conf includes are sorted ascending, for include
statements with a '*' from glob.
2019-09-25 16:50:30 +02:00
Jens Hoffrichter
b966dd8e06 Added -b / source address option to smallapp/unbound-anchor.c 2019-09-24 14:42:36 +00:00
W.C.A. Wijngaards
06a91b0eaa 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.
2019-09-23 09:20:12 +02:00
Wouter Wijngaards
3df64cc677
Merge pull request #85 from sam-lunt/add-cap-kill
Add kill capability to systemd service file
2019-09-23 09:18:36 +02:00
sam-lunt
6943cab670
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.
2019-09-21 14:36:12 -05:00
W.C.A. Wijngaards
f635b47ade Changelog entry for #83
- Merge #83 from Maryse47: contrib/unbound.service.in: do not fork
  into the background.
2019-09-20 12:59:41 +02:00
Wouter Wijngaards
eb7f9a50f2
Merge pull request #83 from Maryse47/nofork
unbound.service.in: do not fork into the background
2019-09-20 12:59:21 +02:00
Maryse47
acdd4058d2
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
2019-09-20 10:07:37 +00:00
W.C.A. Wijngaards
1b62399a6e Changelog entry for #81.
- Merge #81 from Maryse47: Consistently use /dev/urandom instead
  of /dev/random in scripts and docs.
2019-09-20 07:44:43 +02:00
Wouter Wijngaards
e1e71eac3e
Merge pull request #81 from Maryse47/urandom
Consistently use /dev/urandom instead of /dev/random in scripts and docs
2019-09-20 07:44:22 +02:00
W.C.A. Wijngaards
aefd2df51f (Changelog entry for #82).
- Merge #82 from hardfalcon: Downgrade CAP_NET_ADMIN to CAP_NET_RAW
  in unbound.service.
2019-09-20 07:38:34 +02:00
Wouter Wijngaards
15020f7666
Merge pull request #82 from hardfalcon/patch-1
Downgrade CAP_NET_ADMIN to CAP_NET_RAW in unbound.service
2019-09-20 07:37:32 +02:00
Pascal Ernster
ae2d5276d2
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.
2019-09-20 04:47:56 +00:00
Maryse47
ce0e9bef45 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
2019-09-19 17:40:49 +02:00
W.C.A. Wijngaards
1dcc88b6e8 - Merge #80 from stasic: Improve wording in man page.
(Changelog entry for merge)
2019-09-19 16:56:14 +02:00
Wouter Wijngaards
faa9dd7bf6
Merge pull request #80 from stasic/patch-1
Improve wording in man page
2019-09-19 16:54:42 +02:00
Arsen Stasic
9303292b7f
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*.
2019-09-19 14:51:54 +00:00
W.C.A. Wijngaards
9f0b260c49 - Fix wrong response ttl for prepended short CNAME ttls, this would
create a wrong zero_ttl response count with serve-expired enabled.
2019-09-19 16:29:51 +02:00
W.C.A. Wijngaards
ab53baa6f5 - Fix for oss-fuzz build warning. 2019-09-19 10:09:49 +02:00
W.C.A. Wijngaards
554e4a939c - Fix fix for #78 to also free service callback struct. 2019-09-19 10:03:47 +02:00
W.C.A. Wijngaards
45b3215594 - oss-fuzz badge on README.md. 2019-09-19 09:55:23 +02:00
W.C.A. Wijngaards
3cb1cdeebd - Merge pull request #76 from Maryse47: Improvements and fixes for
systemd unbound.service.
(Changelog note for merge of #76).
2019-09-19 09:53:21 +02:00
Wouter Wijngaards
9a9d59ecaf
Merge pull request #76 from Maryse47/patch-1
Improvements and fixes for systemd unbound.service
2019-09-19 09:52:30 +02:00
W.C.A. Wijngaards
1a4eaaabc5 - Fix #78: Memory leak in outside_network.c. 2019-09-19 09:11:23 +02:00
Maryse47
ff8fd0be5c 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.
2019-09-18 21:48:12 +02:00
W.C.A. Wijngaards
13d96540de - Use explicit bzero for wiping clear buffer of hash in cachedb,
reported by Eric Sesterhenn from X41 D-Sec.
2019-09-11 15:31:03 +02:00
Ralph Dolmans
f3dfb4d537 Typo fix, reported by jpmens 2019-09-09 18:54:23 +02:00
Ralph Dolmans
9843b836ee Merge branch 'master' into rpz 2019-09-09 17:17:43 +02:00
Ralph Dolmans
4ac33aa104 - Merge clean up
- revert dname2str off by one fix
- fix str2dname off by one at right location
2019-09-09 17:13:08 +02:00
Ralph Dolmans
2b5cd8e9b4 Merge remote-tracking branch 'ralph/feature/rpz' into rpz 2019-09-09 17:11:26 +02:00
W.C.A. Wijngaards
e45e9f1ce0 - Fix #72: configure --with-syslog-facility=LOCAL0-7 with default
LOG_DAEMON (as before) can set the syslog facility that the server
  uses to log messages.
2019-09-09 14:27:55 +02:00
W.C.A. Wijngaards
05b9f4fd28 - Fix #71: fix openssl error squelch commit compilation error. 2019-09-04 08:44:19 +02:00
W.C.A. Wijngaards
1089fd6dc1 - squelch DNS over TLS errors 'ssl handshake failed crypto error'
on low verbosity, they show on verbosity 3 (query details), because
  there is a high volume and the operator cannot do anything for the
  remote failure.  Specifically filters the high volume errors.
2019-09-03 09:47:27 +02:00
W.C.A. Wijngaards
366296ec14 - updated Makefile dependencies. 2019-09-02 15:56:24 +02:00
W.C.A. Wijngaards
7f9aa6734a - ipset: refactor long routine into three smaller ones. 2019-09-02 15:17:25 +02:00
W.C.A. Wijngaards
9902a5f81d - ipset module #28: log that an address is added, when verbosity high. 2019-09-02 13:50:42 +02:00
W.C.A. Wijngaards
cd0a2b1af1 - Master is 1.9.4 in development. 2019-08-27 09:56:20 +02:00
Ralph Dolmans
bc39217070 Don't pass along unused parameter 2019-08-23 12:45:34 +02:00
Ralph Dolmans
ccb576f95e - add always_deny action, use this one for RPZ
- use localzone's memory layout when removing rr from rrset
2019-08-23 12:15:37 +02:00
W.C.A. Wijngaards
a374dfb669 - Fix contrib/fastrpz.patch asprintf return value checks. 2019-08-23 08:41:46 +02:00
W.C.A. Wijngaards
79fa94834e - 1.9.3rc2 release candidate tag. 2019-08-22 14:50:49 +02:00
W.C.A. Wijngaards
e35d5f5a2d delete duplicate file. 2019-08-22 13:32:34 +02:00
W.C.A. Wijngaards
334e2b1e35 updated fastrpz.patch to apply cleanly. 2019-08-22 13:31:09 +02:00
W.C.A. Wijngaards
06847ff3be - Fix that pkg-config is setup before --enable-systemd needs it. 2019-08-22 12:22:25 +02:00
W.C.A. Wijngaards
80c2c69fa7 - Fix log_dns_msg to log irrespective of minimal responses config. 2019-08-21 17:41:29 +02:00
Ralph Dolmans
8b752e359e - Document limitation of pidfile removal outside of chroot directory. 2019-08-19 13:27:19 +02:00
W.C.A. Wijngaards
d3b3d64ef3 - Remove warning about unknown cast-function-type warning pragma. 2019-08-16 12:52:58 +02:00