]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix memory leak in SPAKE kdcpreauth module
authorsashan <anedvedicky@gmail.com>
Thu, 26 May 2022 06:51:10 +0000 (08:51 +0200)
committerGreg Hudson <ghudson@mit.edu>
Tue, 31 May 2022 23:31:31 +0000 (19:31 -0400)
Commit ff57dc682a27bd205d715f3c0bed84890f2453c4 introduced a memory
leak into verify_response().  reply_key is no longer passed to the
callback and therefore needs to be freed by this function.

[ghudson@mit.edu: rewrote commit message]

ticket: 9061 (new)
tags: pullup
target_version: 1.20-next

src/plugins/preauth/spake/spake_kdc.c

index 687cdc9e0aca3521de30dfa8846af66007029ace..1a772d450fb906455af85a4d4a64a699bfab98f1 100644 (file)
@@ -469,6 +469,7 @@ cleanup:
     zapfree(spakeresult.data, spakeresult.length);
     krb5_free_data_contents(context, &thash);
     krb5_free_keyblock(context, k1);
+    krb5_free_keyblock(context, reply_key);
     k5_free_spake_factor(context, factor);
     (*respond)(arg, ret, NULL, NULL, NULL);
 }