Bug 1262846 (CVE-2015-5276)

Summary: CVE-2015-5276 gcc: Predictable randomness from std::random_device
Product: [Other] Security Response Reporter: Florian Weimer <fweimer>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: cbuissar, jakub, jwakely, law, mcermak, mfranc, mnewsome, mpolacek, security-response-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-12 16:12:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1262852    
Bug Blocks: 1262855    

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?