Description
True random number generators (TRNG) generally have a limited source of entropy and therefore can fail or block.
The rate at which true random numbers can be generated is limited. It is important that one uses them only when they are needed for security.
Potential Impact
Availability
DoS: Crash, Exit, or Restart
Demonstrative Examples
while (1){
if (haveNewConnection()){if (hwRandom()){int sessionID = hwRandom();createNewConnection(sessionID);} } }Mitigations & Prevention
Rather than failing on a lack of random numbers, it is often preferable to wait for more numbers to be created.
Related Weaknesses
Taxonomy Mappings
- CLASP: — Failure of TRNG
- The CERT Oracle Secure Coding Standard for Java (2011): MSC02-J — Generate strong random numbers
Frequently Asked Questions
What is CWE-333?
CWE-333 (Improper Handling of Insufficient Entropy in TRNG) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Variant-level weakness. True random number generators (TRNG) generally have a limited source of entropy and therefore can fail or block.
How can CWE-333 be exploited?
Attackers can exploit CWE-333 (Improper Handling of Insufficient Entropy in TRNG) to dos: crash, exit, or restart. This weakness is typically introduced during the Architecture and Design, Implementation phase of software development.
How do I prevent CWE-333?
Key mitigations include: Rather than failing on a lack of random numbers, it is often preferable to wait for more numbers to be created.
What is the severity of CWE-333?
CWE-333 is classified as a Variant-level weakness (Low-Medium abstraction). Its actual severity depends on the specific context and how the weakness manifests in your application.