[SCM] Samba Shared Repository - branch master updated
Ralph Böhme
slow at samba.org
Fri Dec 20 11:34:03 UTC 2019
The branch, master has been updated
via a85d257c1ec librpc: Do not access name[-1] trying to push "" into a dnsp_name
via 16557e4480a selftest: Confirm parse of dnsProperty records
via 49197368d4d WHATSNEW: Celebrate the end of smbdes and the almost-end of in-tree AES
via 30cbc5b90e4 s4-smbd: Also restart prefork children lost to SIGKILL (-9)
from b28d1dca86d librpc: Add test for ndr_string_length()
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit a85d257c1ec3a4505f2a4fcbec0f7e1f60dbff91
Author: Andrew Bartlett <abartlet at samba.org>
Date: Fri Dec 20 10:50:09 2019 +1300
librpc: Do not access name[-1] trying to push "" into a dnsp_name
This simply matches the behaviour from before e7b1acaddf2ccc7de0301cc67f72187ab450e7b5
when the logic for a trailing . was added. This matches what is added in
the dnsRecord attribute for a name of "." over the dnsserver RPC
management interface and is based on what Windows does for that name
in (eg) an MX record.
No a security bug because we use talloc and so name will be just the
end of the talloc header.
Credit to OSS-Fuzz
Found using the fuzz_ndr_X fuzzer
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
Autobuild-User(master): Ralph Böhme <slow at samba.org>
Autobuild-Date(master): Fri Dec 20 11:33:52 UTC 2019 on sn-devel-184
commit 16557e4480a7502d45186854546d502479be156f
Author: Andrew Bartlett <abartlet at samba.org>
Date: Fri Dec 20 11:34:38 2019 +1300
selftest: Confirm parse of dnsProperty records
This confirms a name of "." will round-trip correctly.
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 49197368d4dc6925ce7713d46d8adb93c51da433
Author: Andrew Bartlett <abartlet at samba.org>
Date: Fri Dec 20 16:33:54 2019 +1300
WHATSNEW: Celebrate the end of smbdes and the almost-end of in-tree AES
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 30cbc5b90e4951a0ea924c204ff73e15c9750ace
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Dec 19 11:20:30 2019 +1300
s4-smbd: Also restart prefork children lost to SIGKILL (-9)
Samba 4.10 and later versions have a process restart capability to greatly
reduce the impact of crashes due to a NULL pointer de-reference or abort().
However SIGKILL was deliberatly omitted.
Sadly this is the most likely case, due to the OOM killer, as raised here:
https://lists.samba.org/archive/samba-technical/2019-November/134529.html
Subsequent discussion (offline) has been to agree that we should restart in
this case.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14221
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
-----------------------------------------------------------------------
Summary of changes:
WHATSNEW.txt | 9 ++++++--
librpc/ndr/ndr_dnsp.c | 14 ++++++++++--
python/samba/tests/blackbox/ndrdump.py | 14 ++++++++++++
source4/librpc/tests/dnsp-DnssrvRpcRecord.txt | 32 +++++++++++++++++++++++++++
source4/smbd/process_prefork.c | 3 ++-
5 files changed, 67 insertions(+), 5 deletions(-)
create mode 100644 source4/librpc/tests/dnsp-DnssrvRpcRecord.txt
Changeset truncated at 500 lines:
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 3a7e90afee2..0faf69e030f 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -27,8 +27,8 @@ we test with in our CI infrastructure.
(Build time support for the file server with Python 2.6 has not
changed)
-GnuTLS 3.4.7 required
----------------------
+Removing in-tree cryptography: GnuTLS 3.4.7 required
+----------------------------------------------------
Samba is making efforts to remove in-tree cryptographic functionality,
and to instead rely on externally maintained libraries. To this end,
@@ -38,6 +38,11 @@ Samba now requires GnuTLS 3.4.7 to be installed (including development
headers at build time) for all configurations, not just the Samba AD
DC.
+Thanks to this work Samba no longer ships an in-tree DES
+implementation and on GnuTLS 3.6.5 or later Samba will include no
+in-tree cryptography other than the MD4 hash and that
+implemented in our copy of Heimdal.
+
Using GnuTLS for SMB3 encryption you will notice huge performance and copy
speed improvements. Tests with the CIFS Kernel client from Linux Kernel 5.3
show a 3x speed improvement for writing and a 2.5x speed improvement for reads!
diff --git a/librpc/ndr/ndr_dnsp.c b/librpc/ndr/ndr_dnsp.c
index 974ff5ebff2..d75c58fca37 100644
--- a/librpc/ndr/ndr_dnsp.c
+++ b/librpc/ndr/ndr_dnsp.c
@@ -106,8 +106,18 @@ enum ndr_err_code ndr_push_dnsp_name(struct ndr_push *ndr, int ndr_flags, const
}
total_len = strlen(name) + 1;
- /* cope with names ending in '.' */
- if (name[strlen(name)-1] != '.') {
+ /*
+ * cope with names ending in '.'
+ */
+ if (name[0] == '\0') {
+ /*
+ * Don't access name[-1] for the "" input, which has
+ * the same meaning as a lone '.'.
+ *
+ * This allows a round-trip of a dnsRecord from
+ * Windows of a MX record of '.'
+ */
+ } else if (name[strlen(name)-1] != '.') {
total_len++;
count++;
}
diff --git a/python/samba/tests/blackbox/ndrdump.py b/python/samba/tests/blackbox/ndrdump.py
index ee34753e5a8..b3c837819b1 100644
--- a/python/samba/tests/blackbox/ndrdump.py
+++ b/python/samba/tests/blackbox/ndrdump.py
@@ -368,6 +368,20 @@ dump OK
expected_head)
self.assertTrue(actual.endswith(expected_tail))
+ # Confirm parsing of dnsProperty records
+ def test_ndrdump_dnsp_DnssrvRpcRecord(self):
+
+ expected = open(self.data_path("dnsp-DnssrvRpcRecord.txt")).read().encode('utf8')
+ try:
+ actual = self.check_output(
+ "ndrdump dnsp dnsp_DnssrvRpcRecord struct " +\
+ "--input BQAPAAXwAAC3AAAAAAADhAAAAAAAAAAAAAoBAAA= "+\
+ "--base64-input --validate")
+ except BlackboxProcessError as e:
+ self.fail(e)
+
+ self.assertEqual(actual, expected)
+
# Test a --validate push of a NULL union pointer
def test_ndrdump_fuzzed_NULL_union_PAC_BUFFER(self):
expected = b'''pull returned Success
diff --git a/source4/librpc/tests/dnsp-DnssrvRpcRecord.txt b/source4/librpc/tests/dnsp-DnssrvRpcRecord.txt
new file mode 100644
index 00000000000..fd169223c74
--- /dev/null
+++ b/source4/librpc/tests/dnsp-DnssrvRpcRecord.txt
@@ -0,0 +1,32 @@
+pull returned Success
+ dnsp_DnssrvRpcRecord: struct dnsp_DnssrvRpcRecord
+ wDataLength : 0x0005 (5)
+ wType : DNS_TYPE_MX (15)
+ version : 0x05 (5)
+ rank : DNS_RANK_ZONE (240)
+ flags : 0x0000 (0)
+ dwSerial : 0x000000b7 (183)
+ dwTtlSeconds : 0x00000384 (900)
+ dwReserved : 0x00000000 (0)
+ dwTimeStamp : 0x00000000 (0)
+ data : union dnsRecordData(case 15)
+ mx: struct dnsp_mx
+ wPriority : 0x000a (10)
+ nameTarget :
+push returned Success
+pull returned Success
+ dnsp_DnssrvRpcRecord: struct dnsp_DnssrvRpcRecord
+ wDataLength : 0x0005 (5)
+ wType : DNS_TYPE_MX (15)
+ version : 0x05 (5)
+ rank : DNS_RANK_ZONE (240)
+ flags : 0x0000 (0)
+ dwSerial : 0x000000b7 (183)
+ dwTtlSeconds : 0x00000384 (900)
+ dwReserved : 0x00000000 (0)
+ dwTimeStamp : 0x00000000 (0)
+ data : union dnsRecordData(case 15)
+ mx: struct dnsp_mx
+ wPriority : 0x000a (10)
+ nameTarget :
+dump OK
diff --git a/source4/smbd/process_prefork.c b/source4/smbd/process_prefork.c
index a7222079624..5667fb5f1ef 100644
--- a/source4/smbd/process_prefork.c
+++ b/source4/smbd/process_prefork.c
@@ -518,7 +518,8 @@ static void prefork_child_pipe_handler(struct tevent_context *ev,
DBG_ERR("Parent %d, Child %d terminated with signal %d\n",
getpid(), pid, status);
if (status == SIGABRT || status == SIGBUS || status == SIGFPE ||
- status == SIGILL || status == SIGSYS || status == SIGSEGV) {
+ status == SIGILL || status == SIGSYS || status == SIGSEGV ||
+ status == SIGKILL) {
prefork_restart(ev, rc);
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list