RNG_SystemRNG should not fall back on rng_systemFromNoise on Windows

RESOLVED FIXED in 3.15.1

Status

NSS
Libraries
P2
normal
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Wan-Teh Chang, Assigned: Wan-Teh Chang)

Tracking

trunk
3.15.1
All
Windows XP

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
Created attachment 762187 [details] [diff] [review]
Windows patch (lib/freebl/win_rand.c)

All the major operating systems have a system entropy source:
/dev/urandom on POSIX and RtlGenRandom on Windows.

By default, RNG_SystemRNG should fail (returning 0) rather than
falling back on rng_systemFromNoise if it cannot use the system
entropy source.

The attached Windows patch makes this change to the RNG_SystemRNG
function in lib/freebl/win_rand.c. It also removes the obsolete
code for Windows versions older than Windows XP.
Attachment #762187 - Flags: superreview?(rrelyea)
Attachment #762187 - Flags: review?(bsmith)
(Assignee)

Comment 1

4 years ago
Comment on attachment 762187 [details] [diff] [review]
Windows patch (lib/freebl/win_rand.c)

Ryan reviewed this patch at https://codereview.chromium.org/17058006/

Patch checked in: https://hg.mozilla.org/projects/nss/rev/17df3000588a
Attachment #762187 - Flags: superreview?(rrelyea)
Attachment #762187 - Flags: review?(bsmith)
Attachment #762187 - Flags: checked-in+
(Assignee)

Comment 2

4 years ago
Edited the bug's summary to reflect what was done in NSS 3.15.1 (Windows only).

Opened bug 889116 to finish this work.
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
OS: All → Windows XP
Resolution: --- → FIXED
Summary: RNG_SystemRNG should not fall back on rng_systemFromNoise on platforms with a system entropy source → RNG_SystemRNG should not fall back on rng_systemFromNoise on Windows
You need to log in before you can comment on or make changes to this bug.