mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
CVE-2022-37966 s4:libnet: initialize libnet_SetPassword() arguments explicitly to zero by default.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15237 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
f1c5fa28c4
commit
9e69289b09
@ -487,8 +487,8 @@ NTSTATUS libnet_JoinDomain(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, stru
|
|||||||
const char *password_str = NULL;
|
const char *password_str = NULL;
|
||||||
|
|
||||||
r->out.error_string = NULL;
|
r->out.error_string = NULL;
|
||||||
r2.samr_handle.out.error_string = NULL;
|
ZERO_STRUCT(r2);
|
||||||
|
|
||||||
tmp_ctx = talloc_named(mem_ctx, 0, "libnet_Join temp context");
|
tmp_ctx = talloc_named(mem_ctx, 0, "libnet_Join temp context");
|
||||||
if (!tmp_ctx) {
|
if (!tmp_ctx) {
|
||||||
r->out.error_string = NULL;
|
r->out.error_string = NULL;
|
||||||
|
@ -942,6 +942,7 @@ static NTSTATUS libnet_SetPassword_samr(struct libnet_context *ctx, TALLOC_CTX *
|
|||||||
goto disconnect;
|
goto disconnect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ZERO_STRUCT(r2);
|
||||||
r2.samr_handle.level = LIBNET_SET_PASSWORD_SAMR_HANDLE;
|
r2.samr_handle.level = LIBNET_SET_PASSWORD_SAMR_HANDLE;
|
||||||
r2.samr_handle.in.account_name = r->samr.in.account_name;
|
r2.samr_handle.in.account_name = r->samr.in.account_name;
|
||||||
r2.samr_handle.in.newpassword = r->samr.in.newpassword;
|
r2.samr_handle.in.newpassword = r->samr.in.newpassword;
|
||||||
@ -965,6 +966,7 @@ static NTSTATUS libnet_SetPassword_generic(struct libnet_context *ctx, TALLOC_CT
|
|||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
union libnet_SetPassword r2;
|
union libnet_SetPassword r2;
|
||||||
|
|
||||||
|
ZERO_STRUCT(r2);
|
||||||
r2.samr.level = LIBNET_SET_PASSWORD_SAMR;
|
r2.samr.level = LIBNET_SET_PASSWORD_SAMR;
|
||||||
r2.samr.in.account_name = r->generic.in.account_name;
|
r2.samr.in.account_name = r->generic.in.account_name;
|
||||||
r2.samr.in.domain_name = r->generic.in.domain_name;
|
r2.samr.in.domain_name = r->generic.in.domain_name;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user