2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

34964 Commits

Author SHA1 Message Date
Petr Špaček
660d502c64 Fix incorrect version bump in statistics channels
The version number for the XML statistics channel was not incremented
correctly after removal of isc_socket code in
a55589f881bc4e4c1099e50b6d4ce84ffc7b5ba3, and the JSON version number
was not incremented at all.
2021-11-04 18:45:36 -07:00
Evan Hunt
b3aba19582 Merge branch '2973-http-buffer-fix' into 'main'
statschannel doesn't handle multiple reads correctly

Closes #2973

See merge request isc-projects/bind9!5530
2021-11-05 01:09:44 +00:00
Evan Hunt
5f05cf97c7 CHANGES for [GL #2973] 2021-11-04 17:08:53 -07:00
Mark Andrews
0b83f1495d Handle truncating the request stream in isc_httpd
If we have had to truncate the request stream, don't resume
reading from it.
2021-11-04 17:06:36 -07:00
Mark Andrews
49531e4582 Handle HTTP/1.1 pipelined requests
Check to see whether there are outstanding requests in the
httpd receive buffer after sending the response, and if so,
process them.

Test that pipelined requests are handled by sending multiple
minimal HTTP/1.1 using netcat (nc) and checking that we get
back the same number of responses.
2021-11-04 17:05:29 -07:00
Mark Andrews
e46c64bf42 Consume the HTTP headers after processing a request
Remember the amount of space consumed by the HTTP headers, then
move any trailing data to the start of the httpd->recvbuf once
we have finished processing the request.
2021-11-04 17:00:18 -07:00
Evan Hunt
cbf8c2e019 statschannel doesn't handle multiple reads correctly
if an incoming HTTP request is incomplete, but nothing else is clearly
wrong with it, the stats channel continues reading to see if there's
more coming.  the buffer length was not being processed correctly in
this case.  also, the server state was not reset correctly when the
request was complete, so that subsequent requests could be appended to
the first buffer instead of being treated as new.

in addition fixing the above problems, this commit also increases the
size of the httpd request buffer from 1024 to 4096, because some
browsers send a lot of headers.
2021-11-04 15:52:58 +11:00
Mark Andrews
76375797b5 Merge branch '2998-cid-340918-uninitialized-variables-uninit' into 'main'
Resolve "CID 340918: Uninitialized variables (UNINIT)"

Closes #2998

See merge request isc-projects/bind9!5556
2021-11-03 09:50:53 +00:00
Mark Andrews
6b6c89b3ea Silence Coverity false positive
Coverity if failing to determine that 'priv.elements[i].length' is
actually valid when 'buf[i]' is non-NULL.  Initialise 'priv' to
zeros.
2021-11-03 20:10:34 +11:00
Michal Nowak
4bebcd4503 Merge branch 'mnowak/fix-typo-in-dns_name_copy-with-result.spatch' into 'main'
Fix typo in dns_name_copy-with-result.spatch

See merge request isc-projects/bind9!5549
2021-11-02 18:27:34 +00:00
Michal Nowak
a0d0dee4af
Fix typo in dns_name_copy-with-result.spatch
A typo introduced in f3f1cab05e05c9bdd5da91f3ab159ec6658ec7f4 prevents
execution of the dns_name_copy-with-result.spatch. The replacement
should end with semicolon not a colon:

    plus: parse error:
      File "cocci/dns_name_copy-with-result.spatch", line 28, column 23, charpos = 421
      around = ':',
      whole content = + dns_name_copy(E1, E2):
2021-11-02 19:16:41 +01:00
Mark Andrews
26a9c4fba9 Merge branch '2970-bind9-xsl-is-not-properly-transmitted-over-stats-channel' into 'main'
Resolve "bind9.xsl is not properly transmitted over stats channel"

Closes #2970

See merge request isc-projects/bind9!5522
2021-11-02 11:44:44 +00:00
Mark Andrews
04e3ba0b51 Check that bind9.xsl is properly transmitted 2021-11-02 11:18:45 +00:00
Mark Andrews
5bde56a4bb Add '\n' to the end of each line when generating xsl.c
This makes the bind9.xml more readable in a browser when debugging
and also ensures that the file is properly terminated in the HTTP
transaction.
2021-11-02 11:18:45 +00:00
Mark Andrews
d051de17de Merge branch '2993-replace-instances-of-arraysize-with-array_size' into 'main'
Resolve "Replace instances of ARRAYSIZE with ARRAY_SIZE"

Closes #2993

See merge request isc-projects/bind9!5551
2021-11-02 10:57:45 +00:00
Mark Andrews
22662fc28e Replace ARRAYSIZE with ARRAY_SIZE 2021-11-02 16:14:40 +11:00
Mark Andrews
a174dfb462 Merge branch '2991-address-reported-by-coverity-in-updated-openssl-code' into 'main'
Resolve "Address reports by Coverity in updated OpenSSL code"

Closes #2991

See merge request isc-projects/bind9!5547
2021-11-01 22:37:43 +00:00
Mark Andrews
7806615714 Address bugs in opensslrsa_tofile
1) if 'key->external' is set we just need to call
   dst__privstruct_writefile
2) the cleanup of 'bufs' was incorrect as 'i' doesn't reflect the
   the current index into 'bufs'.  Use a simple for loop.

This review was triggered by Coverity reporting a buffer overrun
on 'bufs'.
2021-11-01 21:50:47 +00:00
Mark Andrews
573a5858fa Address potential memory leak in openssldh_parse()
'dh' was being assigned to key->keydata.dh too soon which could
result in a memory leak on error.  Moved the assignement of
key->keydata.dh until after dh was correct.

Coverity was reporting dead code on the error path cleaning up 'dh'
which triggered this review.
2021-11-01 21:50:47 +00:00
Michal Nowak
dfd040a5aa Merge branch 'mnowak/dst-fix-unavailable-comparekeys' into 'main'
Add comparekeys to release tarball

See merge request isc-projects/bind9!5548
2021-11-01 17:48:12 +00:00
Michal Nowak
41c8bb0ad3
Add comparekeys to release tarball
'make dist' omits lib/dns/tests/comparekeys/ (added in
7101afa23cfc7cd005aeeb00802481094a0b9cf5) from release tarball it
creates which makes the unit:gcc:tarball CI job permanently fail in the
dst unit test.
2021-11-01 15:17:31 +01:00
Artem Boldariev
17716214f4 Merge branch 'artem/tls-do-not-strictly-require-key-and-cert' into 'main'
Be less strict regarding "tls" statements in the configuration file by allowing both "key-file" and "cert-file" be omitted

See merge request isc-projects/bind9!5546
2021-10-30 09:13:59 +00:00
Artem Boldariev
a19a519224 Be less strict regarding "tls" statements in the configuration file
In the 9.17.19 release "tls" statements verification code was
added. The code was too strict and assumed that every such a statement
should have both "cert-file" and "key-file" specified. This turned out
to be a regression, as in some cases we plan to use the "tls"
statement to specify TLS connection parameters.

This commit fixes this behaviour; now a "tls" statement should either
have both "cert-file" and "key-file" specified, or both should be
omitted.
2021-10-30 11:54:33 +03:00
Petr Špaček
51bb008f4b Merge branch 'pspacek/reentrant-cleanup' into 'main'
remove last remaining reference to _REENTRANT macro and fix DLZ example

See merge request isc-projects/bind9!5544
2021-10-29 07:09:20 +00:00
Petr Špaček
ed7fe739c4
remove last remaining reference to _REENTRANT macro and fix DLZ example
It was used only as guard against unused variable declaration, but the
surrounding code depends on strtok_r being defined unconditionally, so
there is no point in guarding a variable.
Glibc documentation suggests it is obsolete anyway and e.g. Meson build
system decided to ignore it. It seems to be required only by old
Solaris compiler and OpenIndiana uses gcc.
2021-10-29 09:08:20 +02:00
Petr Špaček
b2eb166758 Merge branch 'pspacek/clang-format-gen-patch' into 'main'
retain diff output if clang-format changes something

See merge request isc-projects/bind9!5543
2021-10-29 07:07:09 +00:00
Petr Špaček
ca4393fc9f
retain diff output if clang-format changes something
It's major PITA trying to guess what exactly clang-format has changed,
so how CI stores patch file with changes which can be applied locally if
needed.
2021-10-28 16:45:14 +02:00
Petr Špaček
f465fe8103 Merge branch 'pspacek/placeholder' into 'main'
Add placeholder for [GL !332P]

See merge request isc-projects/bind9!5542
2021-10-28 14:12:01 +00:00
Petr Špaček
2139d4cb85
Add placeholder for [GL !332P] 2021-10-28 16:00:58 +02:00
Michał Kępień
c52df1bd73 Merge branch 'michal/disable-pylint-warning-C0209' into 'main'
Disable PyLint warning C0209

See merge request isc-projects/bind9!5538
2021-10-28 13:37:37 +00:00
Michał Kępień
860ca4e0ef Disable PyLint warning C0209
PyLint 2.11 reports a new warning, C0209 (consider-using-f-string).
Since f-strings are only available in Python 3.6+, existing scripts
cannot be updated to use this feature just yet because they would stop
working with older Python versions.  Instead, disable PyLint warning
C0209 for the time being.  Sort all disabled warnings in .pylintrc.
2021-10-28 14:03:04 +02:00
Michał Kępień
11232eb500 Merge branch 'v9_17_19-release' into 'main'
Merge 9.17.19 release branch

See merge request isc-projects/bind9!5535
2021-10-28 10:10:20 +00:00
Michał Kępień
88dde4d0be Move CHANGES entry for GL #2308
GL #2308 was originally referenced by CHANGES entry 5727.  However, the
corresponding code change turned out to be flawed and had to be reverted
in BIND 9.17.19, causing CHANGES entry 5727 to be turned into a
placeholder on the release branch.

Commit 63145fb1d328eb66f9c786d2273bc2e3f6a3ecf5 subsequently addressed
the flaw, so the fix for GL #2308 will be included in BIND 9.17.20.
Move the relevant CHANGES entry to reflect that.
2021-10-28 12:05:58 +02:00
Michał Kępień
8e8ce6d714 Set up release notes for BIND 9.17.20 2021-10-28 12:05:58 +02:00
Michał Kępień
aef124bddb Update BIND version to 9.17.19 2021-10-28 12:05:58 +02:00
Michał Kępień
0ee28766a2 Add a CHANGES marker 2021-10-28 12:05:58 +02:00
Michał Kępień
a330d6f76f Merge branch 'michal/prepare-documentation-for-bind-9.17.19' into 'security-main'
Prepare documentation for BIND 9.17.19

See merge request isc-private/bind9!325
2021-10-28 12:05:58 +02:00
Michał Kępień
b3e5134728 Merge branch '2899-security-disable-lame-cache' into 'security-main'
[CVE-2021-25219] Disable "lame-ttl" cache

See merge request isc-private/bind9!322
2021-10-28 12:05:58 +02:00
Michał Kępień
08a2f4c0b7 Prepare release notes for BIND 9.17.19 2021-10-28 12:05:58 +02:00
Ondřej Surý
88c6b4e7af Add CHANGES and release note for [GL #2899] 2021-10-28 12:05:58 +02:00
Michał Kępień
e22506337c Add release note for GL #2911 2021-10-28 12:05:58 +02:00
Ondřej Surý
af0b8d0ba8 Enable lame response detection even with disabled lame cache
Previously, when lame cache would be disabled by setting lame-ttl to 0,
it would also disable lame answer detection.  In this commit, we enable
the lame response detection even when the lame cache is disabled.  This
enables stopping answer processing early rather than going through the
whole answer processing flow.
2021-10-28 12:05:58 +02:00
Michał Kępień
9e36b5bf09 Reorder release notes 2021-10-28 12:05:58 +02:00
Ondřej Surý
011e9418ce Disable lame-ttl cache
The lame-ttl cache is implemented in ADB as per-server locked
linked-list "indexed" with <qname,qtype>.  This list has to be walked
every time there's a new query or new record added into the lame cache.
Determined attacker can use this to degrade performance of the resolver.

Resolver testing has shown that disabling the lame cache has little
impact on the resolver performance and it's a minimal viable defense
against this kind of attack.
2021-10-28 12:05:58 +02:00
Michał Kępień
3f8dcef5a8 Tweak and reword release notes 2021-10-28 12:05:58 +02:00
Michał Kępień
db7e727e28 Tweak and reword recent CHANGES entries 2021-10-28 12:05:58 +02:00
Michał Kępień
9af0b8dbf4 Minor tweaks to PKCS#11 docs and ARM formatting
Explain more clearly what engine_pkcs11 is.  Fix improperly rendered
pre-formatted text.
2021-10-28 12:05:58 +02:00
Michał Kępień
b964ec71eb Update release checklist 2021-10-28 12:05:58 +02:00
Arаm Sаrgsyаn
02940b71a3 Merge branch '2843-openssl-3-deprecations' into 'main'
Refactoring for OpenSSL 3.0.0 support

Closes #2843

See merge request isc-projects/bind9!5385
2021-10-28 09:42:42 +00:00
Mark Andrews
df1d8c9e9b Add release note for [GL #2843] 2021-10-28 07:40:10 +00:00