...
Failure to properly null-terminate a character sequence that is passed to a library function that expects a string can result in buffer overflows and the execution of arbitrary code with the permissions of the vulnerable process. Null-termination errors can also result in unintended information disclosure.
Rule | Severity | Likelihood | Detectable | RepairableRemediation Cost | Priority | Level |
|---|---|---|---|---|---|---|
STR32-C | High | Probable | No | YesMedium | P12 | L1 |
Automated Detection
Tool | Version | Checker | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Astrée |
| Supported Astrée supports the implementation of library stubs to fully verify this guideline. | |||||||
| Axivion Bauhaus Suite |
| CertC-STR32 | Partially implemented: can detect some violation of the rule | ||||||
| CodeSonar |
| MISC.MEM.NTERM.CSTRING | Unterminated C String | ||||||
| Compass/ROSE | Can detect some violations of this rule | ||||||||
| Coverity |
| STRING_NULL | Fully implemented | ||||||
| Cppcheck Premium |
| premium-cert-str32-c | |||||||
| Helix QAC |
| DF2835, DF2836, DF2839 | |||||||
| Klocwork |
| NNTS.MIGHT | |||||||
| LDRA tool suite |
| 404 S, 600 S | Partially implemented | ||||||
| Parasoft C/C++test |
| CERT_C-STR32-a | Avoid overflow due to reading a not zero terminated string | ||||||
| Polyspace Bug Finder |
| Checks for:
Rule partially covered. | |||||||
| PVS-Studio |
| V692 | |||||||
| TrustInSoft Analyzer |
| match format and arguments | Partially verified. |
...