[tor-bugs] #17815 [Tor]: [PATCH] eliminate modulo bias in OpenBSD's hardened malloc

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Dec 11 06:57:01 UTC 2015


#17815: [PATCH] eliminate modulo bias in OpenBSD's hardened malloc
-----------------------------+-----------------
     Reporter:  logan        |      Owner:
         Type:  enhancement  |     Status:  new
     Priority:  Medium       |  Milestone:
    Component:  Tor          |    Version:
     Severity:  Normal       |   Keywords:
Actual Points:               |  Parent ID:
       Points:               |    Sponsor:
-----------------------------+-----------------
 Currently, there is a modulo bias introduced by using:

 i = rand() % bp->free;

 Is there a reason not to import arc4random_uniform() which takes care of
 modulo bias ?

 In the mean time, attached is a small patch that reduces the modulo bias.

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


More information about the tor-bugs mailing list