s3:passdb: Zero local memory in secrets_domain_info_kerberos_keys()
authorPavel Filipenský <pfilipensky@samba.org>
Fri, 19 Aug 2022 13:25:28 +0000 (15:25 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 26 Aug 2022 07:59:32 +0000 (07:59 +0000)
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/passdb/machine_account_secrets.c

index 5cc275457a44548f3a0d0f5a29f7fc079341667f..a9b1fe82a01617b785c0d56050f00d79b0a87f57 100644 (file)
@@ -1093,6 +1093,7 @@ static int secrets_domain_info_kerberos_keys(struct secrets_domain_info1_passwor
                TALLOC_FREE(keys);
                return krb5_ret;
        }
+       talloc_keep_secret(cleartext_utf8_b.data);
        cleartext_utf8.data = (void *)cleartext_utf8_b.data;
        cleartext_utf8.length = cleartext_utf8_b.length;