...
Integer wrap can lead to buffer overflows and the execution of arbitrary code by an attacker.
Rule | Severity | Likelihood | Detectable | RepairableRemediation Cost | Priority | Level |
|---|---|---|---|---|---|---|
INT30-C | High | Likely | No | NoHigh | P9 | L2 |
Automated Detection
Tool | Version | Checker | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Astrée |
| integer-overflow | Fully checked | ||||||
| Axivion Bauhaus Suite |
| CertC-INT30 | Implemented | ||||||
| CodeSonar |
| ALLOC.SIZE.ADDOFLOW | Addition overflow of allocation size | ||||||
| Compass/ROSE | Can detect violations of this rule by ensuring that operations are checked for overflow before being performed (Be mindful of exception INT30-EX2 because it excuses many operations from requiring validation, including all the operations that would validate a potentially dangerous operation. For instance, adding two | ||||||||
| Coverity |
| INTEGER_OVERFLOW | Implemented | ||||||
| Cppcheck Premium |
| premium-cert-int30-c | |||||||
| Helix QAC |
| C2910, C3383, C3384, C3385, C3386 C++2910 DF2911, DF2912, DF2913, | |||||||
| Klocwork |
| NUM.OVERFLOW | |||||||
| LDRA tool suite |
| 493 S, 494 S | Partially implemented | ||||||
| Parasoft C/C++test |
| CERT_C-INT30-a | Avoid wraparounds when performing arithmetic integer operations | ||||||
| Polyspace Bug Finder |
| CERT C: Rule INT30-C | Checks for:
Rule partially covered. | ||||||
| PVS-Studio |
| V658, V1012, V1028, V5005, V5011 | |||||||
| TrustInSoft Analyzer |
| unsigned overflow | Exhaustively verified. |
...