Các cách xuất hiện
Implementation : This weakness typically occurs when an unexpected value is provided to the product, or if an error occurs that is not properly detected. It frequently occurs in calculations involving physical dimensions such as size, length, width, and height.
Nền tảng áp dụng
Ngôn ngữ
Lớp: Not Language-Specific (Undetermined)
Hậu quả phổ biến
| Phạm vi |
Tác động |
Khả năng xảy ra |
| Availability | DoS: Crash, Exit, or Restart
Ghi chú: A Divide by Zero results in a crash. | |
Ví dụ đã quan sát
| Tài liệu tham khảo |
Mô tả |
| Invalid size value leads to divide by zero. |
| "Empty" content triggers divide by zero. |
| Height value of 0 triggers divide by zero. |
Phương pháp phát hiện
Automated Static Analysis
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Hiệu quả : High
Fuzzing
Fuzz testing (fuzzing) is a powerful technique for generating large numbers of diverse inputs - either randomly or algorithmically - and dynamically invoking the code with those inputs. Even with random inputs, it is often capable of generating unexpected results such as crashes, memory corruption, or resource consumption. Fuzzing effectively produces repeatable test cases that clearly indicate bugs, which helps developers to diagnose the issues.
Hiệu quả : High
Ghi chú ánh xạ lỗ hổng
Lý do : This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
Bình luận : Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.
Tài liệu tham khảo
REF-371
Handling Errors Exceptionally Well in C++
Alex Allain.
https://www.cprogramming.com/tutorial/exceptions.html REF-372
Exceptions and Exception Handling (C# Programming Guide)
Microsoft.
https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/exceptions/ REF-1534
Automated Technical Debt Measure, Version 2
OMG.
https://www.omg.org/spec/ATDM2/1.0/PDF REF-1550
Secure PLC Coding Practices: Top 20 List
Secure PLC Programming project.
https://plc-security.com/
Gửi
| Tên |
Tổ chức |
Ngày |
Ngày phát hành |
Version |
| CWE Community |
|
2008-04-11 +00:00 |
2008-04-11 +00:00 |
Draft 9 |
Sửa đổi
| Tên |
Tổ chức |
Ngày |
Bình luận |
| Sean Eidemiller |
Cigital |
2008-07-01 +00:00 |
added/updated demonstrative examples |
| Eric Dalci |
Cigital |
2008-07-01 +00:00 |
updated Time_of_Introduction |
| CWE Content Team |
MITRE |
2008-09-08 +00:00 |
updated Common_Consequences, Description, Relationships, Other_Notes, Taxonomy_Mappings |
| CWE Content Team |
MITRE |
2008-11-24 +00:00 |
updated Relationships, Taxonomy_Mappings |
| CWE Content Team |
MITRE |
2009-05-27 +00:00 |
updated Demonstrative_Examples |
| CWE Content Team |
MITRE |
2009-10-29 +00:00 |
updated Other_Notes |
| CWE Content Team |
MITRE |
2011-06-01 +00:00 |
updated Common_Consequences, Relationships, Taxonomy_Mappings |
| CWE Content Team |
MITRE |
2011-09-13 +00:00 |
updated Relationships, Taxonomy_Mappings |
| CWE Content Team |
MITRE |
2012-05-11 +00:00 |
updated Relationships, Taxonomy_Mappings |
| CWE Content Team |
MITRE |
2014-07-30 +00:00 |
updated Relationships, Taxonomy_Mappings |
| CWE Content Team |
MITRE |
2015-12-07 +00:00 |
updated Relationships |
| CWE Content Team |
MITRE |
2017-11-08 +00:00 |
updated Demonstrative_Examples, Taxonomy_Mappings |
| CWE Content Team |
MITRE |
2019-01-03 +00:00 |
updated Relationships, Taxonomy_Mappings |
| CWE Content Team |
MITRE |
2020-02-24 +00:00 |
updated Relationships |
| CWE Content Team |
MITRE |
2020-08-20 +00:00 |
updated Relationships |
| CWE Content Team |
MITRE |
2020-12-10 +00:00 |
updated Relationships |
| CWE Content Team |
MITRE |
2022-10-13 +00:00 |
updated References |
| CWE Content Team |
MITRE |
2023-04-27 +00:00 |
updated Demonstrative_Examples, Detection_Factors, References, Relationships |
| CWE Content Team |
MITRE |
2023-06-29 +00:00 |
updated Mapping_Notes |
| CWE Content Team |
MITRE |
2025-04-03 +00:00 |
updated Demonstrative_Examples |
| CWE Content Team |
MITRE |
2025-12-11 +00:00 |
updated Applicable_Platforms, Relationships, Weakness_Ordinalities |
| CWE Content Team |
MITRE |
2026-10-28 +00:00 |
updated Demonstrative_Examples, Description, Modes_of_Introduction, References, Relationships, Taxonomy_Mappings |