[tor-commits] [tor/master] Clean keys on stack in rend_service_rendezvous_has_opened()

nickm at torproject.org nickm at torproject.org
Mon Jun 25 16:08:58 UTC 2012


commit 276f95182c864a4cb9457bf56d842ef297e2cd2b
Author: Andrea Shepard <andrea at persephoneslair.org>
Date:   Fri Jun 15 20:54:45 2012 -0700

    Clean keys on stack in rend_service_rendezvous_has_opened()
---
 src/or/rendservice.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 50950d1..acc3cea 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -1847,9 +1847,16 @@ rend_service_rendezvous_has_opened(origin_circuit_t *circuit)
   /* Change the circuit purpose. */
   circuit_change_purpose(TO_CIRCUIT(circuit), CIRCUIT_PURPOSE_S_REND_JOINED);
 
-  return;
+  goto done;
+
  err:
   circuit_mark_for_close(TO_CIRCUIT(circuit), reason);
+ done:
+  memset(buf, 0, sizeof(buf));
+  memset(serviceid, 0, sizeof(serviceid));
+  memset(hexcookie, 0, sizeof(hexcookie));
+
+  return;
 }
 
 /*





More information about the tor-commits mailing list