...
Using an invalid iterator range is similar to allowing a buffer overflow, which can lead to an attacker running arbitrary code.
Rule | Severity | Likelihood | Detectable | RepairableRemediation Cost | Priority | Level |
|---|---|---|---|---|---|---|
CTR53-CPP | High | Probable | No | NoHigh | P6 | L2 |
Automated Detection
Tool | Version | Checker | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Astrée |
| overflow_upon_dereference | |||||||||||||||||||
| CodeSonar |
| LANG.MEM.BO | Buffer Overrun | ||||||||||||||||||
| Helix QAC |
| C++3802 | |||||||||||||||||||
| Parasoft C/C++test |
| STL-36 | CERT_CPP-CTR53-a | Do not use an iterator range that isn't really a range | |||||||||||||||||
| Polyspace Bug Finder |
| CERT C++: CTR53-CPP | Checks for invalid iterator range (rule partially covered). | ||||||||||||||||||
| PVS-Studio |
| PRQA QA-C | 4.1 | 3802 | PRQA QA-C++ | ||||||||||||||||
| Include Page | PRQA QA-C++_V | PRQA QA-C++_V | 3802 | PVS-Studio | 6.22 | V539, V662, V789General analysis rule set |
Related Vulnerabilities
In Fun with erase(), Chris Rohlf discusses the exploit potential of a program that calls vector::erase() with invalid iterator ranges [Rohlf 2009].
...