Hi all,

Okay, next issue, this one should be straightforward (one-liner):

A forgotten (... * b->blklen) factor in balloon_close causes 
wipememory() to wipe only a tiny fraction of the balloon working memory 
before freeing it.

--- - wipememory (b->block, parallelism * b->n_blocks); + wipememory 
(b->block, parallelism * b->n_blocks * b->blklen); ---

The allocation is in: balloon_open (line 1145):

block = xtrycalloc (parallelism * b->n_blocks, b->blklen);

This block contains intermediate hash values of the key material, but 
it's a wipe after the algo has run, so it's not critical, probably.

Thanks for your time, --Bert

diff --git a/cipher/kdf.c b/cipher/kdf.c
index 16cec4e4..66eff6c6 100644
--- a/cipher/kdf.c
+++ b/cipher/kdf.c
@@ -1416,7 +1416,7 @@ balloon_close (balloon_ctx_t b)
 
   if (b->block)
     {
-      wipememory (b->block, parallelism * b->n_blocks);
+      wipememory (b->block, parallelism * b->n_blocks * b->blklen);
       xfree (b->block);
     }
 

Attachment: OpenPGP_0x1B93BFCB9DEDFAA0.asc
Description: application/pgp-keys

Attachment: OpenPGP_signature.asc
Description: PGP signature

_______________________________________________
Gcrypt-devel mailing list
[email protected]
https://lists.gnupg.org/mailman/listinfo/gcrypt-devel

Reply via email to