目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1336

100%

CWE-369 除零错误 类漏洞列表 154

CWE-369 除零错误 类弱点 154 条 CVE 漏洞汇总,含 AI 中文分析。

CWE-369 属于逻辑错误类漏洞,指程序执行除以零的操作。当输入异常值或未检测到的错误导致除数为零时,攻击者可利用此缺陷引发程序崩溃、拒绝服务或获取敏感内存信息。开发者应在除法运算前严格校验除数非零,对物理尺寸等关键参数实施边界检查与异常处理,从而确保计算逻辑的健壮性。

MITRE CWE 官方描述
CWE:CWE-369 除以零(Divide By Zero) 英文:产品将某个值除以零。 这种弱点通常发生在向产品提供了意外值,或者发生了未被正确检测到的错误时。它经常出现在涉及物理尺寸(如大小、长度、宽度和高度)的计算中。
常见影响 (1)
Availability DoS: Crash, Exit, or Restart
A Divide by Zero results in a crash.
代码示例 (2)
The following Java example contains a function to compute an average but does not validate that the input value used as the denominator is not zero. This will create an exception for attempting to divide by zero. If this error is not handled by Java exception handling, unexpected results can occur.
public int computeAverageResponseTime (int totalTime, int numRequests) { return totalTime / numRequests; }
Bad · Java
public int computeAverageResponseTime (int totalTime, int numRequests) throws ArithmeticException { if (numRequests == 0) { System.out.println("Division by zero attempted!"); throw ArithmeticException; } return totalTime / numRequests; }
Good · Java
The following C/C++ example contains a function that divides two numeric values without verifying that the input value used as the denominator is not zero. This will create an error for attempting to divide by zero, if this error is not caught by the error handling capabilities of the language, unexpected results can occur.
double divide(double x, double y){ return x/y; }
Bad · C
const int DivideByZero = 10; double divide(double x, double y){ if ( 0 == y ){ throw DivideByZero; } return x/y; } ... try{ divide(10, 0); } catch( int i ){ if(i==DivideByZero) { cerr<<"Divide by zero error"; } }
Good · C
CVE ID 标题 CVSS 风险等级 Published
CVE-2020-27760 ImageMagick Studio ImageMagick 数字错误漏洞 — ImageMagick 5.5 - 2020-12-03
CVE-2020-27763 ImageMagick Studio ImageMagick 数字错误漏洞 — ImageMagick 3.3 - 2020-12-03
CVE-2020-25708 LibVNCServer 数字错误漏洞 — libvncserver 7.5 - 2020-11-27
CVE-2019-5637 Beckhoff TwinCAT 数字错误漏洞 — TwinCAT 2 7.5 High 2019-11-21

CWE-369(除零错误) 是常见的弱点类别,本平台收录该类弱点关联的 154 条 CVE 漏洞。