[tor-bugs] #17796 [Tor]: Make crypto_digest_t allocated using minimal memory

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Dec 29 01:01:41 UTC 2015


#17796: Make crypto_digest_t allocated using minimal memory
--------------------+------------------------------------
 Reporter:  nickm   |          Owner:
     Type:  defect  |         Status:  needs_review
 Priority:  Low     |      Milestone:  Tor: 0.2.8.x-final
Component:  Tor     |        Version:
 Severity:  Normal  |     Resolution:
 Keywords:          |  Actual Points:
Parent ID:          |         Points:
  Sponsor:          |
--------------------+------------------------------------

Comment (by teor):

 Looks good to me, let's get it merged.

 Replying to [comment:6 nickm]:
 > I've removed the log code in the switch statement and turned it into a
 hard assert.

 Looks much clearer.

 > I don't see how that memwipe could write into unallocated memory,
 though: tmpenv is stack-allocated, at the largest size required.

 Oops, I was confused by the call to `crypto_digest_alloc_bytes`, and
 missed how the structure was actually allocated.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/17796#comment:7>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list