diff options
author | Polampalli, Archana <archana.polampalli@windriver.com> | 2023-09-29 17:43:20 +0000 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2023-10-17 08:41:21 -0400 |
commit | 112397bdfe59c9479309d3838a34fc2ef579c44f (patch) | |
tree | 10a02588890798708d97202601d8d058ac1993fe | |
parent | 2715358a3d7e134ae7e2dc689f40c4fdd47f6d4f (diff) | |
download | meta-openembedded-112397bdfe59c9479309d3838a34fc2ef579c44f.tar.gz |
samba: fix CVE-2022-2127
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-2022-2127.patch | 44 | ||||
-rw-r--r-- | meta-networking/recipes-connectivity/samba/samba_4.14.14.bb | 1 |
2 files changed, 45 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/samba/samba/CVE-2022-2127.patch b/meta-networking/recipes-connectivity/samba/samba/CVE-2022-2127.patch new file mode 100644 index 0000000000..e94d5d538b --- /dev/null +++ b/meta-networking/recipes-connectivity/samba/samba/CVE-2022-2127.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 53838682570135b753fa622dfcde111528563c2d Mon Sep 17 00:00:00 2001 | ||
2 | From: Ralph Boehme <slow@samba.org> | ||
3 | Date: Fri, 16 Jun 2023 12:28:47 +0200 | ||
4 | Subject: [PATCH] CVE-2022-2127: ntlm_auth: cap lanman response length value | ||
5 | |||
6 | We already copy at most sizeof(request.data.auth_crap.lm_resp) bytes to the | ||
7 | lm_resp buffer, but we don't cap the length indicator. | ||
8 | |||
9 | BUG: https://bugzilla.samba.org/show_bug.cgi?id=15072 | ||
10 | |||
11 | Signed-off-by: Ralph Boehme <slow@samba.org> | ||
12 | |||
13 | CVE: CVE-2022-2127 | ||
14 | |||
15 | Upstream-Status: Backport [https://github.com/samba-team/samba/commit/53838682570135b753fa622dfcde111528563c2d] | ||
16 | |||
17 | Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com> | ||
18 | --- | ||
19 | source3/utils/ntlm_auth.c | 8 ++++++-- | ||
20 | 1 file changed, 6 insertions(+), 2 deletions(-) | ||
21 | |||
22 | diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c | ||
23 | index 02a2379..c82ea45 100644 | ||
24 | --- a/source3/utils/ntlm_auth.c | ||
25 | +++ b/source3/utils/ntlm_auth.c | ||
26 | @@ -574,10 +574,14 @@ NTSTATUS contact_winbind_auth_crap(const char *username, | ||
27 | memcpy(request.data.auth_crap.chal, challenge->data, MIN(challenge->length, 8)); | ||
28 | |||
29 | if (lm_response && lm_response->length) { | ||
30 | + size_t capped_lm_response_len = MIN( | ||
31 | + lm_response->length, | ||
32 | + sizeof(request.data.auth_crap.lm_resp)); | ||
33 | + | ||
34 | memcpy(request.data.auth_crap.lm_resp, | ||
35 | lm_response->data, | ||
36 | - MIN(lm_response->length, sizeof(request.data.auth_crap.lm_resp))); | ||
37 | - request.data.auth_crap.lm_resp_len = lm_response->length; | ||
38 | + capped_lm_response_len); | ||
39 | + request.data.auth_crap.lm_resp_len = capped_lm_response_len; | ||
40 | } | ||
41 | |||
42 | if (nt_response && nt_response->length) { | ||
43 | -- | ||
44 | 2.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 11b6ade405..b71c4b3fca 100644 --- a/meta-networking/recipes-connectivity/samba/samba_4.14.14.bb +++ b/meta-networking/recipes-connectivity/samba/samba_4.14.14.bb | |||
@@ -35,6 +35,7 @@ SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \ | |||
35 | file://CVE-2021-44758.patch;patchdir=source4/heimdal \ | 35 | file://CVE-2021-44758.patch;patchdir=source4/heimdal \ |
36 | file://CVE-2023-34966_0001.patch \ | 36 | file://CVE-2023-34966_0001.patch \ |
37 | file://CVE-2023-34966_0002.patch \ | 37 | file://CVE-2023-34966_0002.patch \ |
38 | file://CVE-2022-2127.patch \ | ||
38 | " | 39 | " |
39 | 40 | ||
40 | SRC_URI:append:libc-musl = " \ | 41 | SRC_URI:append:libc-musl = " \ |