29 lines
996 B
Diff
29 lines
996 B
Diff
From b6d83057c7a14f958dffbc418ed799cdf779bf5a Mon Sep 17 00:00:00 2001
|
|
From: zhengxiaoxiao <zhengxiaoxiao2@huawei.com>
|
|
Date: Fri, 29 Jul 2022 15:25:39 +0800
|
|
Subject: [PATCH] Clear AESWRAP scratch area immediately after use
|
|
|
|
* cipher/cipher-aeswrap.c (_gcry_cipher_aeswrap_decrypt): Call
|
|
wipememory.
|
|
|
|
Reference: https://github.com/gpg/libgcrypt/commit/69e2e498f6a14cfa731cb5718bdb64f440f1c829
|
|
Conflict: NA
|
|
---
|
|
cipher/cipher-aeswrap.c | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/cipher/cipher-aeswrap.c b/cipher/cipher-aeswrap.c
|
|
index c182657..4240751 100644
|
|
--- a/cipher/cipher-aeswrap.c
|
|
+++ b/cipher/cipher-aeswrap.c
|
|
@@ -187,6 +187,7 @@ _gcry_cipher_aeswrap_decrypt (gcry_cipher_hd_t c,
|
|
memcpy (r+(i-1)*8, b+8, 8);
|
|
}
|
|
}
|
|
+ wipememory (b, 16); /* Clear scratch area. */
|
|
|
|
/* If an IV has been set we compare against this Alternative Initial
|
|
Value; if it has not been set we compare against the standard IV. */
|
|
--
|
|
2.27.0
|
|
|