...
Copying string data to a buffer that is too small to hold that data results in a buffer overflow. Attackers can exploit this condition to execute arbitrary code with the permissions of the vulnerable process.
Rule | Severity | Likelihood | Detectable | RepairableRemediation Cost | Priority | Level |
|---|---|---|---|---|---|---|
STR50-CPP | High | Likely | No | NoMedium | P18P9 | L1L2 |
Automated Detection
Tool | Version | Checker | Description | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Astrée |
| stream-input-char-array | Partially checked + soundly supported | |||||||||||||
| CodeSonar |
| MISC.MEM.NTERM | No space for null terminator | |||||||||||||
| Helix QAC |
| C++5216 DF2835, DF2836, DF2839, | ||||||||||||||
| Klocwork |
| NNTS.MIGHT NNTS.TAINTED NNTS.MUST SV.UNBOUND_STRING_INPUT.CIN | ||||||||||||||
| LDRA tool suite |
| 489 S, 66 X, 70 X, 71 X | Partially implemented | |||||||||||||
| Parasoft C/C++test |
| CERT_CPP-STR50-aCERT_CPP-STR50-b | de | Use vector and string instead of arraysAvoid overflow due to reading a not zero terminated string | Avoid accessing arrays out of boundsPrevent buffer overflows from tainted data |
| ||||||||||
| Polyspace Bug Finder |
| CERT C++: STR50-CPP | Checks for:
Rule partially covered. | |||||||||||||
| RuleChecker |
| stream-input-char-array | Partially checked | |||||||||||||
| Security Reviewer - Static Reviewer |
| RTOS_33 RTOS_34 shadowVariable UNSAFE_03 UNSAFE_04 | Fully implemented | |||||||||||||
| SonarQube C/C++ Plugin |
| S3519 |
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
...