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

admin 2022年1月2日04:08:45CWE(弱点枚举)评论14 views1380字阅读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中文网

特别标注: 本站(CN-SEC.COM)所有文章仅供技术研究,若将其信息做其他用途,由用户承担全部法律及连带责任,本站不承担任何法律及连带责任,请遵守中华人民共和国安全法.
  • 我的微信
  • 微信扫一扫
  • weinxin
  • 我的微信公众号
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2022年1月2日04:08:45
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                  CWE-333 TRNG不充分信息熵的处理不恰当 http://cn-sec.com/archives/612915.html

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: