...
String-handling functions defined in the C Standard, subclause 7.24, and elsewhere are susceptible to common programming errors that can lead to serious, exploitable vulnerabilities. Proper use of the C11 Annex K functions can eliminate most of these issues.
Recommendation | Severity | Likelihood | Remediation Cost | Priority | Level |
---|
STR07-C | High | Probable | Medium | P12 | L1 |
Automated Detection
Tool | Version | Checker | Description |
---|
Astrée | |
| Supported |
Axivion Bauhaus Suite | Include Page |
---|
| Axivion Bauhaus Suite_V |
---|
| Axivion Bauhaus Suite_V |
---|
|
| CertC-STR07 |
|
CodeSonar | | BADFUNC.BO.OEMTOCHAR BADFUNC.BO.STRCAT BADFUNC.BO.STRCATCHAINW BADFUNC.BO.STRCHR BADFUNC.BO.STRCMP BADFUNC.BO.STRCOLL BADFUNC.BO.STRCPY BADFUNC.BO.STRCSPN BADFUNC.BO.STRLEN BADFUNC.BO.STRPBRK BADFUNC.BO.STRRCHR BADFUNC.BO.STRSPN BADFUNC.BO.STRSTR BADFUNC.BO.STRTOK BADFUNC.BO.STRTRNS
| Use of OemToAnsi , use of OemToChar (both include checks for uses of similar functions) Use of strcat (includes checks for uses of similar library functions such as StrCatA() , wcscat() , etc.) Use of StrCatChainW
Use of strchr
Use of strcmp (includes checks for uses of similar library functions such as lstrcmp() ) Use of strcoll
Use of strcpy (includes checks for uses of similar library functions such as StrCCpy() , wcscpy() , etc.) Use of strcspn
Use of strlen (includes checks for uses of similar library functions such as lstrlen() ) Use of strpbrk
Use of strrchr
Use of strspn
Use of strstr
Use of strtok
Use of strtrns |
Helix QAC | | C5008 |
|
LDRA tool suite | | 44 S | Enhanced enforcement |
PRQA QA-CPRQA QA-C_v | PRQA QA-C_v | Warncall -wc strcpy -wc strcat -wc strncpy -wc strncat | Partially implemented | CERT_C-STR07-a | Avoid using unsafe string functions that do not check bounds |
Parasoft Insure++ |
|
| Runtime analysis |
PC-lint Plus | Include Page |
---|
| PC-lint Plus_V |
---|
| PC-lint Plus_V |
---|
|
| 586 | Fully supported |
Polyspace Bug Finder | Include Page |
---|
| Polyspace Bug Finder_V |
---|
| Polyspace Bug Finder_V |
---|
|
| CERT C: Rec. STR07-C | Checks for: - Use of dangerous standard function
- Destination buffer overflow in string manipulation
- Insufficient destination buffer size
Rec. partially covered. |
SonarQube C/C++ Plugin | Include Page |
---|
| SonarQube C/C++ Plugin_V |
---|
| SonarQube C/C++ Plugin_V |
---|
|
| S1081 |
|
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
Related Guidelines
Bibliography
...
Image Modified Image Modified Image Modified