summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArchana Polampalli <archana.polampalli@windriver.com>2023-11-22 04:55:24 +0000
committerArmin Kuster <akuster808@gmail.com>2024-01-12 07:14:16 -0500
commit9843839b2374e02fa9e7c998fd8d642b1c0626f9 (patch)
tree22bf2cbe7a0a62847a322033c2316556dbc81fe1
parentcaef5591303834e453e8097f6d9b53259827782e (diff)
downloadmeta-openembedded-9843839b2374e02fa9e7c998fd8d642b1c0626f9.tar.gz
samba: fix CVE-2023-42669
A vulnerability was found in Samba's "rpcecho" development server, a non-Windows RPC server used to test Samba's DCE/RPC stack elements. This vulnerability stems from an RPC function that can be blocked indefinitely. The issue arises because the "rpcecho" service operates with only one worker in the main RPC task, allowing calls to the "rpcecho" server to be blocked for a specified time, causing service disruptions. This disruption is triggered by a "sleep()" call in the "dcesrv_echo_TestSleep()" function under specific conditions. Authenticated users or attackers can exploit this vulnerability to make calls to the "rpcecho" server, requesting it to block for a specified duration, effectively disrupting most services and leading to a complete denial of service on the AD DC. The DoS affects all other services as "rpcecho" runs in the main RPC task. References: https://nvd.nist.gov/vuln/detail/CVE-2023-42669 Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/CVE-2023-42669.patch94
-rw-r--r--meta-networking/recipes-connectivity/samba/samba_4.14.14.bb1
2 files changed, 95 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/samba/samba/CVE-2023-42669.patch b/meta-networking/recipes-connectivity/samba/samba/CVE-2023-42669.patch
new file mode 100644
index 000000000..dfa6aeb02
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba/CVE-2023-42669.patch
@@ -0,0 +1,94 @@
1From 9989568b20c8f804140c22f51548d766a18ed887 Mon Sep 17 00:00:00 2001
2From: Andrew Bartlett <abartlet@samba.org>
3Date: Tue, 12 Sep 2023 18:59:44 +1200
4Subject: [PATCH] CVE-2023-42669 s4-rpc_server: Disable rpcecho server by
5 default
6
7The rpcecho server is useful in development and testing, but should never
8have been allowed into production, as it includes the facility to
9do a blocking sleep() in the single-threaded rpc worker.
10
11BUG: https://bugzilla.samba.org/show_bug.cgi?id=15474
12
13Signed-off-by: Andrew Bartlett <abartlet@samba.org>
14
15CVE: CVE-2023-42669
16
17Upstream-Status: Backport [https://github.com/samba-team/samba/commit/9989568b20c8f804140c22f51548d766a18ed887]
18
19Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
20---
21 docs-xml/smbdotconf/protocol/dcerpcendpointservers.xml | 2 +-
22 lib/param/loadparm.c | 2 +-
23 selftest/target/Samba4.pm | 2 +-
24 source3/param/loadparm.c | 2 +-
25 source4/rpc_server/wscript_build | 3 ++-
26 5 files changed, 6 insertions(+), 5 deletions(-)
27
28diff --git a/docs-xml/smbdotconf/protocol/dcerpcendpointservers.xml b/docs-xml/smbdotconf/protocol/dcerpcendpointservers.xml
29index 8a217cc..c6642b7 100644
30--- a/docs-xml/smbdotconf/protocol/dcerpcendpointservers.xml
31+++ b/docs-xml/smbdotconf/protocol/dcerpcendpointservers.xml
32@@ -6,6 +6,6 @@
33 <para>Specifies which DCE/RPC endpoint servers should be run.</para>
34 </description>
35
36-<value type="default">epmapper, wkssvc, rpcecho, samr, netlogon, lsarpc, drsuapi, dssetup, unixinfo, browser, eventlog6, backupkey, dnsserver</value>
37+<value type="default">epmapper, wkssvc, samr, netlogon, lsarpc, drsuapi, dssetup, unixinfo, browser, eventlog6, backupkey, dnsserver</value>
38 <value type="example">rpcecho</value>
39 </samba:parameter>
40diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
41index eedfa00..75687f5 100644
42--- a/lib/param/loadparm.c
43+++ b/lib/param/loadparm.c
44@@ -2717,7 +2717,7 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
45 lpcfg_do_global_parameter(lp_ctx, "ntvfs handler", "unixuid default");
46 lpcfg_do_global_parameter(lp_ctx, "max connections", "0");
47
48- lpcfg_do_global_parameter(lp_ctx, "dcerpc endpoint servers", "epmapper wkssvc rpcecho samr netlogon lsarpc drsuapi dssetup unixinfo browser eventlog6 backupkey dnsserver");
49+ lpcfg_do_global_parameter(lp_ctx, "dcerpc endpoint servers", "epmapper wkssvc samr netlogon lsarpc drsuapi dssetup unixinfo browser eventlog6 backupkey dnsserver");
50 lpcfg_do_global_parameter(lp_ctx, "server services", "s3fs rpc nbt wrepl ldap cldap kdc drepl winbindd ntp_signd kcc dnsupdate dns");
51 lpcfg_do_global_parameter(lp_ctx, "kccsrv:samba_kcc", "true");
52 /* the winbind method for domain controllers is for both RODC
53diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
54index 651faa7..c7b33d2 100755
55--- a/selftest/target/Samba4.pm
56+++ b/selftest/target/Samba4.pm
57@@ -773,7 +773,7 @@ sub provision_raw_step1($$)
58 wins support = yes
59 server role = $ctx->{server_role}
60 server services = +echo $services
61- dcerpc endpoint servers = +winreg +srvsvc
62+ dcerpc endpoint servers = +winreg +srvsvc +rpcecho
63 notify:inotify = false
64 ldb:nosync = true
65 ldap server require strong auth = yes
66diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
67index 8bcd35f..a99ab35 100644
68--- a/source3/param/loadparm.c
69+++ b/source3/param/loadparm.c
70@@ -879,7 +879,7 @@ static void init_globals(struct loadparm_context *lp_ctx, bool reinit_globals)
71
72 Globals.server_services = str_list_make_v3_const(NULL, "s3fs rpc nbt wrepl ldap cldap kdc drepl winbindd ntp_signd kcc dnsupdate dns", NULL);
73
74- Globals.dcerpc_endpoint_servers = str_list_make_v3_const(NULL, "epmapper wkssvc rpcecho samr netlogon lsarpc drsuapi dssetup unixinfo browser eventlog6 backupkey dnsserver", NULL);
75+ Globals.dcerpc_endpoint_servers = str_list_make_v3_const(NULL, "epmapper wkssvc samr netlogon lsarpc drsuapi dssetup unixinfo browser eventlog6 backupkey dnsserver", NULL);
76
77 Globals.tls_enabled = true;
78 Globals.tls_verify_peer = TLS_VERIFY_PEER_AS_STRICT_AS_POSSIBLE;
79diff --git a/source4/rpc_server/wscript_build b/source4/rpc_server/wscript_build
80index 8c75672..a2520da 100644
81--- a/source4/rpc_server/wscript_build
82+++ b/source4/rpc_server/wscript_build
83@@ -29,7 +29,8 @@ bld.SAMBA_MODULE('dcerpc_rpcecho',
84 source='echo/rpc_echo.c',
85 subsystem='dcerpc_server',
86 init_function='dcerpc_server_rpcecho_init',
87- deps='ndr-standard events'
88+ deps='ndr-standard events',
89+ enabled=bld.CONFIG_GET('ENABLE_SELFTEST')
90 )
91
92
93--
942.40.0
diff --git a/meta-networking/recipes-connectivity/samba/samba_4.14.14.bb b/meta-networking/recipes-connectivity/samba/samba_4.14.14.bb
index dcb4d8137..17d12e439 100644
--- a/meta-networking/recipes-connectivity/samba/samba_4.14.14.bb
+++ b/meta-networking/recipes-connectivity/samba/samba_4.14.14.bb
@@ -51,6 +51,7 @@ SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \
51 file://CVE-2023-34968_0011.patch \ 51 file://CVE-2023-34968_0011.patch \
52 file://CVE-2023-4091-0001.patch \ 52 file://CVE-2023-4091-0001.patch \
53 file://CVE-2023-4091-0002.patch \ 53 file://CVE-2023-4091-0002.patch \
54 file://CVE-2023-42669.patch \
54 " 55 "
55 56
56SRC_URI:append:libc-musl = " \ 57SRC_URI:append:libc-musl = " \