[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #17815 [Tor]: [PATCH] eliminate modulo bias in OpenBSD's hardened malloc
#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
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs