All of lore.kernel.org
 help / color / mirror / Atom feed
From: "akuster" <akuster808@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [dunfell 08/28] samba: CVE-2020-14383 Security Advisory
Date: Sun, 17 Jan 2021 09:46:06 -0800	[thread overview]
Message-ID: <65985a6579064d08009adecb6279a5bb599affca.1610905441.git.akuster808@gmail.com> (raw)
In-Reply-To: <cover.1610905441.git.akuster808@gmail.com>

From: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>

References
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-14383

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit baee1ebeafce5d6a99dafc30b91e6fb760197686)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit 81d14a86353829eba1d55a93d478faf4c5527a89)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 .../samba/samba/CVE-2020-14383.patch          | 112 ++++++++++++++++++
 .../samba/samba_4.10.18.bb                    |   1 +
 2 files changed, 113 insertions(+)
 create mode 100644 meta-networking/recipes-connectivity/samba/samba/CVE-2020-14383.patch

diff --git a/meta-networking/recipes-connectivity/samba/samba/CVE-2020-14383.patch b/meta-networking/recipes-connectivity/samba/samba/CVE-2020-14383.patch
new file mode 100644
index 0000000000..3341b80a38
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba/CVE-2020-14383.patch
@@ -0,0 +1,112 @@
+From ff17443fe761eda864d13957bec45f5bac478fe3 Mon Sep 17 00:00:00 2001
+From: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+Date: Fri, 11 Dec 2020 14:34:31 +0900
+Subject: [PATCH] CVE-2020-14383: s4/dns: Ensure variable initialization with 
+ NULL. do not crash when additional data not found
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Found by Francis Brosnan Blázquez <francis@aspl.es>.
+Based on patches from Francis Brosnan Blázquez <francis@aspl.es>
+and Jeremy Allison <jra@samba.org>
+
+BUG: https://bugzilla.samba.org/show_bug.cgi?id=14472
+BUG: https://bugzilla.samba.org/show_bug.cgi?id=12795
+
+Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
+Reviewed-by: Jeremy Allison <jra@samba.org>
+
+Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
+Autobuild-Date(master): Mon Aug 24 00:21:41 UTC 2020 on sn-devel-184
+
+(based on commit df98e7db04c901259dd089e20cd557bdbdeaf379)
+(based on commit 7afe449e7201be92bed8e53cbb37b74af720ef4e
+
+Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+---
+ .../rpc_server/dnsserver/dcerpc_dnsserver.c   | 31 ++++++++++---------
+ 1 file changed, 17 insertions(+), 14 deletions(-)
+
+diff --git a/source4/rpc_server/dnsserver/dcerpc_dnsserver.c b/source4/rpc_server/dnsserver/dcerpc_dnsserver.c
+index 910de9a1..618c7096 100644
+--- a/source4/rpc_server/dnsserver/dcerpc_dnsserver.c
++++ b/source4/rpc_server/dnsserver/dcerpc_dnsserver.c
+@@ -1754,15 +1754,17 @@ static WERROR dnsserver_enumerate_records(struct dnsserver_state *dsstate,
+ 	TALLOC_CTX *tmp_ctx;
+ 	char *name;
+ 	const char * const attrs[] = { "name", "dnsRecord", NULL };
+-	struct ldb_result *res;
+-	struct DNS_RPC_RECORDS_ARRAY *recs;
++	struct ldb_result *res = NULL;
++	struct DNS_RPC_RECORDS_ARRAY *recs = NULL;
+ 	char **add_names = NULL;
+-	char *rname;
++	char *rname = NULL;
+ 	const char *preference_name = NULL;
+ 	int add_count = 0;
+ 	int i, ret, len;
+ 	WERROR status;
+-	struct dns_tree *tree, *base, *node;
++	struct dns_tree *tree = NULL;
++	struct dns_tree *base = NULL;
++	struct dns_tree *node = NULL;
+ 
+ 	tmp_ctx = talloc_new(mem_ctx);
+ 	W_ERROR_HAVE_NO_MEMORY(tmp_ctx);
+@@ -1845,15 +1847,15 @@ static WERROR dnsserver_enumerate_records(struct dnsserver_state *dsstate,
+ 		}
+ 	}
+ 
+-	talloc_free(res);
+-	talloc_free(tree);
+-	talloc_free(name);
++	TALLOC_FREE(res);
++	TALLOC_FREE(tree);
++	TALLOC_FREE(name);
+ 
+ 	/* Add any additional records */
+ 	if (select_flag & DNS_RPC_VIEW_ADDITIONAL_DATA) {
+ 		for (i=0; i<add_count; i++) {
+-			struct dnsserver_zone *z2;
+-
++			struct dnsserver_zone *z2 = NULL;
++			struct ldb_message *msg = NULL;
+ 			/* Search all the available zones for additional name */
+ 			for (z2 = dsstate->zones; z2; z2 = z2->next) {
+ 				char *encoded_name;
+@@ -1865,14 +1867,15 @@ static WERROR dnsserver_enumerate_records(struct dnsserver_state *dsstate,
+ 						LDB_SCOPE_ONELEVEL, attrs,
+ 						"(&(objectClass=dnsNode)(name=%s)(!(dNSTombstoned=TRUE)))",
+ 						encoded_name);
+-				talloc_free(name);
++				TALLOC_FREE(name);
+ 				if (ret != LDB_SUCCESS) {
+ 					continue;
+ 				}
+ 				if (res->count == 1) {
++					msg = res->msgs[0];
+ 					break;
+ 				} else {
+-					talloc_free(res);
++					TALLOC_FREE(res);
+ 					continue;
+ 				}
+ 			}
+@@ -1885,10 +1888,10 @@ static WERROR dnsserver_enumerate_records(struct dnsserver_state *dsstate,
+ 			}
+ 			status = dns_fill_records_array(tmp_ctx, NULL, DNS_TYPE_A,
+ 							select_flag, rname,
+-							res->msgs[0], 0, recs,
++							msg, 0, recs,
+ 							NULL, NULL);
+-			talloc_free(rname);
+-			talloc_free(res);
++			TALLOC_FREE(rname);
++			TALLOC_FREE(res);
+ 		}
+ 	}
+ 
+-- 
+2.25.1
+
diff --git a/meta-networking/recipes-connectivity/samba/samba_4.10.18.bb b/meta-networking/recipes-connectivity/samba/samba_4.10.18.bb
index 923b2ddf16..1a982368ec 100644
--- a/meta-networking/recipes-connectivity/samba/samba_4.10.18.bb
+++ b/meta-networking/recipes-connectivity/samba/samba_4.10.18.bb
@@ -29,6 +29,7 @@ SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \
            file://0001-Add-options-to-configure-the-use-of-libbsd.patch \
            file://0001-nsswitch-nsstest.c-Avoid-nss-function-conflicts-with.patch \
            file://CVE-2020-14318.patch \
+           file://CVE-2020-14383.patch \
            "
 SRC_URI_append_libc-musl = " \
            file://samba-pam.patch \
-- 
2.17.1


  parent reply	other threads:[~2021-01-17 17:46 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-17 17:45 [dunfell 00/28] Patch review Jan 17th akuster
2021-01-17 17:45 ` [dunfell 01/28] tcpdump: Patch for CVE-2020-8037 akuster
2021-01-17 17:46 ` [dunfell 02/28] dlt-daemon: add upstream patch to fix CVE-2020-29394 akuster
2021-01-17 17:46 ` [dunfell 03/28] pcsc-lite: provide pcsc-lite-lib-native explicitly for native build akuster
2021-01-17 17:46 ` [dunfell 04/28] wireguard-module: fix build issue with 5.4 kernel akuster
2021-01-17 17:46 ` [dunfell 05/28] mcpp: Normalize the patch format of CVE akuster
2021-01-17 17:46 ` [dunfell 06/28] zabbix: CVE-2020-15803 Security Advisory akuster
2021-01-17 17:46 ` [dunfell 07/28] samba: CVE-2020-14318 " akuster
2021-01-17 17:46 ` akuster [this message]
2021-01-17 17:46 ` [dunfell 09/28] php: Upgrade 7.4.4 -> 7.4.9 akuster
2021-01-17 17:46 ` [dunfell 10/28] php: remove the failing ${D}/${TMPDIR} code akuster
2021-01-17 17:46 ` [dunfell 11/28] php: CVE-2020-7070 akuster
2021-01-17 17:46 ` [dunfell 12/28] php: CVE-2020-7069 akuster
2021-01-17 17:46 ` [dunfell 13/28] apache2: upgrade v2.4.43 -> v2.4.46 akuster
2021-01-17 17:46 ` [dunfell 14/28] mariadb: update to 10.4.17 for cve fixes akuster
2021-01-17 17:46 ` [dunfell 15/28] lua: fix CVE-2020-15945 akuster
2021-01-17 17:46 ` [dunfell 16/28] lua: fix CVE-2020-24371 akuster
2021-01-17 17:46 ` [dunfell 17/28] lua: update to 5.3.6 akuster
2021-01-17 17:46 ` [dunfell 18/28] nss: Security fix CVE-2020-12401 akuster
2021-01-17 17:46 ` [dunfell 19/28] wireshark: Several securtiy fixes akuster
2021-01-17 17:46 ` [dunfell 20/28] nodejs: Fix build with icu 67.1 akuster
2021-01-17 17:46 ` [dunfell 21/28] nodejs: Upgrade to 12.18.3 akuster
2021-01-17 17:46 ` [dunfell 22/28] nodejs: Fix arm32/thumb builds with clang akuster
2021-01-17 17:46 ` [dunfell 23/28] nodejs: Update to 12.19.0 akuster
2021-01-17 17:46 ` [dunfell 24/28] nodejs: 12.19.0 -> 12.19.1 akuster
2021-01-17 17:46 ` [dunfell 25/28] nodejs: 12.19.1 -> 12.20.1 akuster
2021-01-17 17:46 ` [dunfell 26/28] libsdl2-mixer: Fix ogg/vorbis support in libsdl2-mixer akuster
2021-01-17 17:46 ` [dunfell 27/28] libsdl2-mixer: set --disable-music-ogg-shared to link statically akuster
2021-01-17 17:46 ` [dunfell 28/28] geoclue: select avahi-daemon if nmea enabled akuster
2021-01-17 20:38 ` [oe] [dunfell 00/28] Patch review Jan 17th Andreas Müller
2021-01-18  4:09   ` akuster
2021-01-18 10:12 ` Diego Santa Cruz
2021-01-18 16:34   ` akuster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65985a6579064d08009adecb6279a5bb599affca.1610905441.git.akuster808@gmail.com \
    --to=akuster808@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.