CWE-333 TRNG不充分信息熵的处理不恰当

admin 2022年1月2日04:08:45评论38 views字数 1380阅读4分36秒阅读模式

CWE-333 TRNG不充分信息熵的处理不恰当

Improper Handling of Insufficient Entropy in TRNG

结构: Simple

Abstraction: Variant

状态: Draft

被利用可能性: Low

基本描述

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.

相关缺陷

  • cwe_Nature: ChildOf cwe_CWE_ID: 331 cwe_View_ID: 1000 cwe_Ordinal: Primary

  • cwe_Nature: ChildOf cwe_CWE_ID: 331 cwe_View_ID: 699 cwe_Ordinal: Primary

  • cwe_Nature: ChildOf cwe_CWE_ID: 703 cwe_View_ID: 1000

适用平台

Language: {'cwe_Class': 'Language-Independent', 'cwe_Prevalence': 'Undetermined'}

常见的影响

范围 影响 注释
Availability DoS: Crash, Exit, or Restart A program may crash or block if it runs out of random numbers.

可能的缓解方案

Implementation

策略:

Rather than failing on a lack of random numbers, it is often preferable to wait for more numbers to be created.

示例代码

This code uses a TRNG to generate a unique session id for new connections to a server:

bad C

while (1){

if (haveNewConnection()){

if (hwRandom()){

int sessionID = hwRandom();
createNewConnection(sessionID);

} } }

This code does not attempt to limit the number of new connections or make sure the TRNG can successfully generate a new random number. An attacker may be able to create many new connections and exhaust the entropy of the TRNG. The TRNG may then block and cause the program to crash or hang.

分类映射

映射的分类名 ImNode ID Fit Mapped Node Name
CLASP Failure of TRNG
The CERT Oracle Secure Coding Standard for Java (2011) MSC02-J Generate strong random numbers

文章来源于互联网:scap中文网

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2022年1月2日04:08:45
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   CWE-333 TRNG不充分信息熵的处理不恰当http://cn-sec.com/archives/612915.html

发表评论

匿名网友 填写信息