The Samba-Bugzilla – Attachment 17923 Details for
Bug 15072
CVE-2022-2127 [SECURITY] lm_resp_len not checked properly in winbindd_pam_auth_crap_send()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for master
CVE-2022-2127-winbindd-crash-lm_resp_len-master-01.patch (text/plain), 2.59 KB, created by
Ralph Böhme
on 2023-06-15 09:29:06 UTC
(
hide
)
Description:
Patch for master
Filename:
MIME Type:
Creator:
Ralph Böhme
Created:
2023-06-15 09:29:06 UTC
Size:
2.59 KB
patch
obsolete
>From 4e206d2df2cbd669f0a8bdb0ff5eb49328421fcf Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Fri, 20 May 2022 10:55:23 +0200 >Subject: [PATCH] CVE-2022-2127: winbindd: Fix WINBINDD_PAM_AUTH_CRAP length > checks > >With WBFLAG_BIG_NTLMV2_BLOB being set plus lm_resp_len too large you >can crash winbind. We don't independently check lm_resp_len >sufficiently. > >Discovered via Coverity ID 1504444 Out-of-bounds access > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=15072 > >Signed-off-by: Volker Lendecke <vl@samba.org> >--- > source3/winbindd/winbindd_pam_auth_crap.c | 31 +++++++++++++++-------- > 1 file changed, 21 insertions(+), 10 deletions(-) > >diff --git a/source3/winbindd/winbindd_pam_auth_crap.c b/source3/winbindd/winbindd_pam_auth_crap.c >index 6120522ce3cf..e6a32c7ed79c 100644 >--- a/source3/winbindd/winbindd_pam_auth_crap.c >+++ b/source3/winbindd/winbindd_pam_auth_crap.c >@@ -52,6 +52,9 @@ struct tevent_req *winbindd_pam_auth_crap_send( > DATA_BLOB chal = data_blob_null; > struct wbint_SidArray *require_membership_of_sid = NULL; > NTSTATUS status; >+ bool lmlength_ok = false; >+ bool ntlength_ok = false; >+ bool pwlength_ok = false; > > req = tevent_req_create(mem_ctx, &state, > struct winbindd_pam_auth_crap_state); >@@ -115,16 +118,24 @@ struct tevent_req *winbindd_pam_auth_crap_send( > fstrcpy(request->data.auth_crap.workstation, lp_netbios_name()); > } > >- if (request->data.auth_crap.lm_resp_len > sizeof(request->data.auth_crap.lm_resp) >- || request->data.auth_crap.nt_resp_len > sizeof(request->data.auth_crap.nt_resp)) { >- if (!(request->flags & WBFLAG_BIG_NTLMV2_BLOB) || >- request->extra_len != request->data.auth_crap.nt_resp_len) { >- DBG_ERR("Invalid password length %u/%u\n", >- request->data.auth_crap.lm_resp_len, >- request->data.auth_crap.nt_resp_len); >- tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER); >- return tevent_req_post(req, ev); >- } >+ lmlength_ok = (request->data.auth_crap.lm_resp_len <= >+ sizeof(request->data.auth_crap.lm_resp)); >+ >+ ntlength_ok = (request->data.auth_crap.nt_resp_len <= >+ sizeof(request->data.auth_crap.nt_resp)); >+ >+ ntlength_ok |= >+ ((request->flags & WBFLAG_BIG_NTLMV2_BLOB) && >+ (request->extra_len == request->data.auth_crap.nt_resp_len)); >+ >+ pwlength_ok = lmlength_ok && ntlength_ok; >+ >+ if (!pwlength_ok) { >+ DBG_ERR("Invalid password length %u/%u\n", >+ request->data.auth_crap.lm_resp_len, >+ request->data.auth_crap.nt_resp_len); >+ tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER); >+ return tevent_req_post(req, ev); > } > > state->domain = talloc_strdup(state, request->data.auth_crap.domain); >-- >2.40.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
slow
:
review+
slow
:
ci-passed+
Actions:
View
Attachments on
bug 15072
:
17292
|
17293
|
17909
|
17923
|
17924
|
17926
|
17927
|
17939
|
17940
|
17949
|
17954
|
17955
|
17956
|
17957