Commit graph

5156 commits

Author SHA1 Message Date
W.C.A. Wijngaards
c99438c6a1 - Fix Out of Bounds Write in sldns_b64_pton(),
fixed by check in sldns_str2wire_int16_data_buf(),
  reported by X41 D-Sec.
2019-12-03 16:10:34 +01:00
W.C.A. Wijngaards
3f3cadd416 - Fix Out of Bounds Write in sldns_str2wire_str_buf(),
reported by X41 D-Sec.
2019-12-03 16:01:31 +01:00
W.C.A. Wijngaards
e183a66d60 - Fix OOB Read in sldns_wire2str_dname_scan(),
reported by X41 D-Sec.
2019-12-03 15:42:34 +01:00
W.C.A. Wijngaards
d2eb78e871 - Fix Assert Causing DoS in dname_pkt_copy(),
reported by X41 D-Sec.
2019-12-03 15:20:48 +01:00
W.C.A. Wijngaards
5a66aecef9 - Fix similar code in auth_zone synth cname to add the extra checks. 2019-12-03 15:11:22 +01:00
W.C.A. Wijngaards
f5e06689d1 - Fix Assert Causing DoS in synth_cname(),
reported by X41 D-Sec.
2019-12-03 15:10:36 +01:00
W.C.A. Wijngaards
5a00b31f86 - Fix text around serial arithmatic used for RRSIG times to refer
to correct RFC number.
2019-12-03 12:58:09 +01:00
W.C.A. Wijngaards
cdbf091c0d Changelog entry for merge of #124.
- Merge pull request #124 from rmetrich: Changed log lock
  from 'quick' to 'basic' because this is an I/O lock.
2019-12-03 10:03:44 +01:00
Wouter Wijngaards
4edb16296b
Merge pull request #124 from rmetrich/basic_loglock
Changed log lock from 'quick' to 'basic' because this is an I/O lock.
2019-12-03 10:03:24 +01:00
W.C.A. Wijngaards
aa64c58368 Changelog entry for #122.
- Merge pull request #122 from he32: In tcp_callback_writer(),
  don't disable time-out when changing to read.
2019-12-02 13:59:43 +01:00
Wouter Wijngaards
b4a01d6096
Merge pull request #122 from he32/timeout-fix
In tcp_callback_writer(), don't disable time-out when changing to read.
2019-12-02 13:59:13 +01:00
Renaud Métrich
d63cb99649 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.
2019-11-26 16:32:07 +01:00
Havard Eidnes
dc0b1699e5 In tcp_callback_writer(), don't disable time-out when changing to read. 2019-11-26 00:02:34 +01:00
W.C.A. Wijngaards
f82f971997 - Add make distclean that removes everything configure produced,
and make maintainer-clean that removes bison and flex output.
2019-11-22 15:10:02 +01:00
George Thessalonikefs
30b0fa1e8e Fix compiler warnings. 2019-11-22 14:30:56 +01:00
W.C.A. Wijngaards
1718a8e6b5 - Fix dname loop maximum, reported by Eric Sesterhenn from X41 D-Sec. 2019-11-22 14:23:00 +01:00
W.C.A. Wijngaards
ebad5416d7 - Fix comments for doxygen in dns64. 2019-11-20 15:22:20 +01:00
W.C.A. Wijngaards
8833d44d01 - Fix python examples/calc.py for eval, reported by X41 D-Sec. 2019-11-20 15:07:09 +01:00
W.C.A. Wijngaards
da4d6ffee3 - Fix Bad Randomness in Seed, reported by X41 D-Sec. 2019-11-20 14:40:50 +01:00
W.C.A. Wijngaards
981fedea0e - Fix NULL Pointer Dereference via Control Port,
reported by X41 D-Sec.
2019-11-20 14:37:13 +01:00
W.C.A. Wijngaards
493921ef1f Review fix of space. 2019-11-20 14:24:31 +01:00
W.C.A. Wijngaards
3a49e683ed - Fix Enum Name not Used, reported by X41 D-Sec. 2019-11-20 14:22:06 +01:00
W.C.A. Wijngaards
3907876eac - Fix Unrequired Checks, reported by X41 D-Sec. 2019-11-20 14:05:54 +01:00
W.C.A. Wijngaards
fcd9b34bb5 - Fix Useless memset() in validator, reported by X41 D-Sec. 2019-11-20 14:02:58 +01:00
W.C.A. Wijngaards
d63ec2dfcb - Fix Terminating Quotes not Written, reported by X41 D-Sec. 2019-11-20 14:01:01 +01:00
W.C.A. Wijngaards
6139943428 - Fix compile with --enable-alloc-checks, reported by X41 D-Sec. 2019-11-20 13:51:10 +01:00
W.C.A. Wijngaards
a76e43341f - Fixed Compat Code Diverging from Upstream, reported by X41 D-Sec. 2019-11-20 13:30:27 +01:00
W.C.A. Wijngaards
d63536289c - 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.
2019-11-20 13:28:49 +01:00
W.C.A. Wijngaards
d085a0039b - Upgrade compat/getentropy_osx.c to version 1.12 from OpenBSD. 2019-11-20 13:12:36 +01:00
W.C.A. Wijngaards
3ebc480690 - Upgrade compat/getentropy_solaris.c to version 1.13 from OpenBSD. 2019-11-20 13:11:05 +01:00
W.C.A. Wijngaards
20dd979d00 - Synchronize compat/getentropy_win.c with version 1.5 from
OpenBSD, no changes but makes the file, comments, identical.
2019-11-20 13:08:43 +01:00
W.C.A. Wijngaards
623dba975a - Upgrade compat/getentropy_linux.c to version 1.46 from OpenBSD. 2019-11-20 13:05:10 +01:00
W.C.A. Wijngaards
09707fc403 - Fix Integer Underflow in Regional Allocator,
reported by X41 D-Sec.
2019-11-20 13:00:56 +01:00
W.C.A. Wijngaards
2dcc7016ac - Fix Local Memory Leak in cachedb_init(),
reported by X41 D-Sec.
2019-11-20 12:56:39 +01:00
W.C.A. Wijngaards
f887552763 - Fix Config Injection in create_unbound_ad_servers.sh,
reported by X41 D-Sec.
2019-11-20 12:02:19 +01:00
W.C.A. Wijngaards
72d348de6a - Fix Out-of-Bounds Read in dname_valid(),
reported by X41 D-Sec.
2019-11-20 11:38:11 +01:00
W.C.A. Wijngaards
7646c96259 - Fix Randomness Error not Handled Properly,
reported by X41 D-Sec.
2019-11-20 11:35:07 +01:00
W.C.A. Wijngaards
d8809c672a - Fix Weak Entropy Used For Nettle,
reported by X41 D-Sec.
2019-11-20 11:28:53 +01:00
W.C.A. Wijngaards
7e3da817c3 - Adjust unbound-control to make stats_shm a read only operation. 2019-11-20 11:18:03 +01:00
W.C.A. Wijngaards
c54fe82886 - Fix Shared Memory World Writeable,
reported by X41 D-Sec.
2019-11-20 11:13:45 +01:00
W.C.A. Wijngaards
1fa40654d2 - Fix Race Condition in autr_tp_create(),
reported by X41 D-Sec.
2019-11-20 11:01:56 +01:00
W.C.A. Wijngaards
d79d75538b - Fix Out of Bounds Read in rrinternal_get_owner(),
reported by X41 D-Sec.
2019-11-20 08:28:12 +01:00
W.C.A. Wijngaards
fa23ee8f31 - Fix Out of Bounds Write in sldns_bget_token_par(),
reported by X41 D-Sec.
2019-11-19 16:54:44 +01:00
W.C.A. Wijngaards
51c23b0209 - Fix Out of Bounds Read in sldns_str2wire_dname(),
reported by X41 D-Sec.
2019-11-19 16:46:33 +01:00
W.C.A. Wijngaards
a3545867fc - Fix Integer Overflow to Buffer Overflow in
sldns_str2wire_dname_buf_origin(), reported by X41 D-Sec.
2019-11-19 16:42:17 +01:00
W.C.A. Wijngaards
02080f6b18 - Fix Integer Overflows in Size Calculations,
reported by X41 D-Sec.
2019-11-19 16:32:40 +01:00
W.C.A. Wijngaards
07156bd5ea - Fix Out-of-bounds Read in rr_comment_dnskey(),
reported by X41 D-Sec.
2019-11-19 16:17:06 +01:00
W.C.A. Wijngaards
2a4e840be4 - Fix Unchecked NULL Pointer in dns64_inform_super()
and ipsecmod_new(), reported by X41 D-Sec.
2019-11-19 15:48:18 +01:00
W.C.A. Wijngaards
226298bbd3 - Fix Integer Overflow in Regional Allocator,
reported by X41 D-Sec.
2019-11-19 15:38:05 +01:00
W.C.A. Wijngaards
5d46bb3879 Cast to unsigned before comparison for assertion. 2019-11-19 15:26:57 +01:00