CWE-125:不合时宜的阅读
查看自定义信息:
通常,这可以允许攻击者从其他内存位置读取敏感信息或导致崩溃。当代码读取可变数量的数据并假设存在哨兵以停止读取操作时,例如字符串中的nul时,可能会发生崩溃。预期的哨兵可能不会位于越野内存中,导致读取过多的数据,从而导致分割故障或缓冲区溢出。该产品可能会修改索引或执行指针算术,该指针算术引用一个在缓冲区边界之外的内存位置。然后,随后的读取操作会产生未定义或意外的结果。
该表显示了与该弱点相关的弱点和高级类别。这些关系定义为childof,parentof,ementof,并深入了解可能存在于较高和较低抽象水平的类似项目。此外,定义了诸如Peerof和Canalsobe之类的关系,以显示用户可能想要探索的类似弱点。
与观点“研究概念”相关(CWE-1000)
与“软件开发”视图相关(CWE-699)
与“简化已发表漏洞的简化映射”(CWE-1003)相关的视图相关(CWE-1003)
与“ CISQ质量措施(2020)”相关(CWE-1305)
Relevant to the view "CISQ Data Protection Measures" (CWE-1340)
The different Modes of Introduction provide information about how and when this weakness may be introduced. The Phase identifies a point in the life cycle at which introduction may occur, while the Note provides a typical scenario related to introduction during the given phase.
This listing shows possible areas for which the given weakness could appear. These may be for specific named Languages, Operating Systems, Architectures, Paradigms, Technologies, or a class of such platforms. The platform is listed along with how frequently the given weakness appears for that instance.
Languages C(不确定的患病率) C ++(不确定的患病率) 技术 班级:ICS/OT(通常很普遍)
This table specifies different individual consequences associated with the weakness. The Scope identifies the application security area that is violated, while the Impact describes the negative technical impact that arises if an adversary succeeds in exploiting this weakness. The Likelihood provides information about how likely the specific consequence is expected to be seen relative to the other consequences in the list. For example, there may be high likelihood that a weakness will be exploited to achieve a certain impact, but a low likelihood that it will be exploited to achieve a different impact.
示例1 In the following code, the method retrieves a value from an array at a specific array index location that is given as an input parameter to the method
(不良代码)
示例语言:C
int getValueFromArray(int *array,int len,int index){ }int值; // check that the array index is less than the maximum //阵列的长度 if(index //在数组的指定索引处获取值 value = array[index]; // if array index is invalid then output error message //和返回值指示错误 别的 {
printf(“值为:%d \ n”,数组[index]); }值= -1; return value; 但是,此方法仅验证给定数组索引小于数组的最大长度,但未检查最小值(CWE-839)。这将使负值被接受为输入阵列索引,这将导致范围读取(CWE-125)并可能允许访问敏感的内存。应检查输入数组索引以验证数组所需的最大值和最小范围(CWE-129)。在此示例中,应修改IF语句以包括最小范围检查,如下所示。
(好代码)
示例语言:C
。。。 //检查数组索引是否在正确的 //数组的值范围 if(index> = 0 && index 。。。
此成员关系表显示了其他CWE类别和视图,将此弱点称为成员。该信息通常可用于理解弱点适合外部信息源的何处。
提供更多信息 - 请选择其他过滤器。
|
使用共同弱点枚举(CWE)和本网站的相关参考Terms of Use。CWE由美国国土安全部(DHS)网络安全和基础设施安全局(CISA),由国土安全系统工程和开发研究所(HSSEDI)由manbetx客户端首页(MITER)。版权所有©2006–2023,Miter Comanbetx客户端首页rporation。CWE,CWSS,CWRAF和CWE徽标是Miter Corporation的商标。manbetx客户端首页 |