CWE-369 除零错误 类弱点 154 条 CVE 漏洞汇总,含 AI 中文分析。
CWE-369 属于逻辑错误类漏洞,指程序执行除以零的操作。当输入异常值或未检测到的错误导致除数为零时,攻击者可利用此缺陷引发程序崩溃、拒绝服务或获取敏感内存信息。开发者应在除法运算前严格校验除数非零,对物理尺寸等关键参数实施边界检查与异常处理,从而确保计算逻辑的健壮性。
public int computeAverageResponseTime (int totalTime, int numRequests) { return totalTime / numRequests; }
public int computeAverageResponseTime (int totalTime, int numRequests) throws ArithmeticException { if (numRequests == 0) { System.out.println("Division by zero attempted!"); throw ArithmeticException; } return totalTime / numRequests; }
double divide(double x, double y){ return x/y; }
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"; } }
| 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 漏洞。