Bug 1262846 (CVE-2015-5276) - CVE-2015-5276 gcc: Predictable randomness from std::random_device
Summary: CVE-2015-5276 gcc: Predictable randomness from std::random_device
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2015-5276
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1262852
Blocks: 1262855
TreeView+ depends on / blocked
 
Reported: 2015-09-14 13:26 UTC by Florian Weimer
Modified: 2021-02-17 04:56 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-12 16:12:24 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 65142 0 None None None 2018-12-19 12:49:32 UTC

Description Florian Weimer 2015-09-14 13:26:24 UTC
It was discovered that the std::random_device class in libstdc++ would
not properly detect short reads and could return return predictable
values if applications used it to obtain randomness from a blocking
source such as /dev/random.

Comment 1 Florian Weimer 2015-09-14 13:31:37 UTC
External references:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65142

Comment 3 Florian Weimer 2015-09-14 13:32:55 UTC
Created gcc tracking bugs for this issue:

Affects: fedora-all [bug 1262852]

Comment 6 Cedric Buissart 2016-01-12 16:16:21 UTC
std::random_device is not guaranteed to be cryptographically secure and should not be used for secure cryptographic code. Thus having a low impact.

Comment 7 Jonathan Wakely 2016-01-12 16:22:43 UTC
I was intending to fix this.

std::random_device can use /dev/random in GCC's implementation (and the intent of the C++ standard is to allow, even encourage that), isn't that suitable for secure crypto?


Note You need to log in before you can comment on or make changes to this bug.