]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:torture: Zero samr_UserInfo union in password set test
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Tue, 2 Aug 2022 03:21:43 +0000 (15:21 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 12 Sep 2022 23:07:37 +0000 (23:07 +0000)
If init_samr_CryptPasswordAES() does not fill the
u.info31.password.auth_data array completely, we may be comparing
uninitialised bytes.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/torture/rpc/samr.c

index 5fe51e510229056b128edcb425fe1361b6eb1977..de354659067b1ff9f6dfe386c96ce0c4a231045c 100644 (file)
@@ -920,6 +920,8 @@ static bool test_SetUserPass_31(struct dcerpc_pipe *p, struct torture_context *t
        s.in.info = &u;
        s.in.level = 31;
 
+       ZERO_STRUCT(u);
+
        u.info31.password_expired = 0;
 
        status = dcerpc_fetch_session_key(p, &session_key);