diff options
| author | NIIBE Yutaka <[email protected]> | 2025-11-06 05:09:55 +0000 |
|---|---|---|
| committer | NIIBE Yutaka <[email protected]> | 2025-11-06 05:12:23 +0000 |
| commit | 12c0b94fcb5fe276ff1b94029828feeac78d73f0 (patch) | |
| tree | 175551fe0890f45f3242a4db3d1bd6be98e2e0df | |
| parent | gpg: Escape chars with high bit set in NOTATION status lines. (diff) | |
| download | gnupg-12c0b94fcb5fe276ff1b94029828feeac78d73f0.tar.gz gnupg-12c0b94fcb5fe276ff1b94029828feeac78d73f0.zip | |
agent: Fix wiping memory in PKDECRYPT command.
* agent/pkdecrypt.c (ecc_kem_decrypt): Don't touch the memory when KEK
is NULL.
--
Fixes-commit: 57a3d2392539167767578dbb1414ad1cfb2a84ab
GnuPG-bug-id: GnuPG-bug-id: 7893
Signed-off-by: NIIBE Yutaka <[email protected]>
| -rw-r--r-- | agent/pkdecrypt.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/agent/pkdecrypt.c b/agent/pkdecrypt.c index 201712c1e..11dcb9ab6 100644 --- a/agent/pkdecrypt.c +++ b/agent/pkdecrypt.c @@ -859,8 +859,11 @@ ecc_kem_decrypt (int is_pgp, ctrl_t ctrl, const char *desc_text, leave: wipememory (sessionkey, sizeof sessionkey); - wipememory (kek, sizeof kek); - xfree (kek); + if (kek) + { + wipememory (kek, sizeof kek); + xfree (kek); + } mpi_release (ecc_ct_mpi); mpi_release (encrypted_sessionkey_mpi); gcry_free (kdf_params.data); |
