mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Merge remote-tracking branch 'teor/memwipe-more-keys'
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
o Minor bugfixes:
|
||||
- Ensure we securely wipe keys from memory after
|
||||
crypto_digest_get_digest and init_curve25519_keypair_from_file
|
||||
have finished using them.
|
||||
Fixes bug 13477.
|
||||
+1
-1
@@ -1684,7 +1684,7 @@ crypto_digest_get_digest(crypto_digest_t *digest,
|
||||
log_warn(LD_BUG, "Called with unknown algorithm %d", digest->algorithm);
|
||||
/* If fragile_assert is not enabled, then we should at least not
|
||||
* leak anything. */
|
||||
memset(r, 0xff, sizeof(r));
|
||||
memwipe(r, 0xff, sizeof(r));
|
||||
tor_fragile_assert();
|
||||
break;
|
||||
}
|
||||
|
||||
+1
-1
@@ -488,7 +488,7 @@ init_curve25519_keypair_from_file(curve25519_keypair_t *keys_out,
|
||||
if (curve25519_keypair_write_to_file(keys_out, fname, tag)<0) {
|
||||
tor_log(severity, LD_FS,
|
||||
"Couldn't write generated key to \"%s\".", fname);
|
||||
memset(keys_out, 0, sizeof(*keys_out));
|
||||
memwipe(keys_out, 0, sizeof(*keys_out));
|
||||
goto error;
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user