程序會調用解析 double 類型的方法,這會導致線程被掛起。
實現 java.lang.Double.parseDouble() 及相關方法時存在漏洞,可能導致在解析位于 [2^(-1022) - 2^(-1075) :2^(-1022) - 2^(-1076)] 范圍內的任何數字時線程被掛起。這個缺陷可被攻擊者用于執行 DOS (Denial of Service) 攻擊。
例 1:下列代碼使用了易受攻擊的方法。
Double d = Double.parseDouble(request.getParameter("d"));
d 參數值位于該范圍(例如 "0.0222507385850720119e-00306")內的請求,致使程序在處理該請求時被掛起。 [1] Standards Mapping - OWASP Top 10 2004 - (OWASP 2004) A9 Application Denial of Service
[2] Standards Mapping - Security Technical Implementation Guide Version 3 - (STIG 3) APP6080 CAT II
[3] Standards Mapping - Security Technical Implementation Guide Version 3.4 - (STIG 3.4) APP6080 CAT II
[4] Standards Mapping - Common Weakness Enumeration - (CWE) CWE ID 730
[5] Standards Mapping - Web Application Security Consortium 24 + 2 - (WASC 24 + 2) Denial of Service
[6] Rick Regan Java Hangs When Converting 2.2250738585072012e-308
[7] Oracle Security Alert for CVE-2010-4476
[8] Standards Mapping - Payment Card Industry Data Security Standard Version 1.1 - (PCI 1.1) Requirement 6.5.9