diff --git a/c/cert/src/rules/CON31-C/DoNotAllowAMutexToGoOutOfScopeWhileLocked.md b/c/cert/src/rules/CON31-C/DoNotAllowAMutexToGoOutOfScopeWhileLocked.md index bafad6e688..e5403d0f7a 100644 --- a/c/cert/src/rules/CON31-C/DoNotAllowAMutexToGoOutOfScopeWhileLocked.md +++ b/c/cert/src/rules/CON31-C/DoNotAllowAMutexToGoOutOfScopeWhileLocked.md @@ -165,7 +165,7 @@ CWE-667 = Union, CON31-C, POS48-C, list) where list = ## Implementation notes -None +This implementation does not allow for thread synchronization to be performed in subroutines. All synchronization must be performed within the context of the other thread management functions. ## References diff --git a/c/cert/src/rules/CON37-C/DoNotCallSignalInMultithreadedProgram.md b/c/cert/src/rules/CON37-C/DoNotCallSignalInMultithreadedProgram.md index 5cf6747dff..660e164cb3 100644 --- a/c/cert/src/rules/CON37-C/DoNotCallSignalInMultithreadedProgram.md +++ b/c/cert/src/rules/CON37-C/DoNotCallSignalInMultithreadedProgram.md @@ -105,6 +105,8 @@ Search for [vulnerabilities](https://wiki.sei.cmu.edu/confluence/display/c/BB.+D ## Implementation notes +This implementation does not consider threads created function pointers. + ## References * CERT-C: [CON37-C: Do not call signal() in a multithreaded program](https://wiki.sei.cmu.edu/confluence/display/c) diff --git a/c/cert/src/rules/CON38-C/PreserveSafetyWhenUsingConditionVariables.md b/c/cert/src/rules/CON38-C/PreserveSafetyWhenUsingConditionVariables.md index 03825f5376..17e4e95822 100644 --- a/c/cert/src/rules/CON38-C/PreserveSafetyWhenUsingConditionVariables.md +++ b/c/cert/src/rules/CON38-C/PreserveSafetyWhenUsingConditionVariables.md @@ -350,7 +350,7 @@ Search for [vulnerabilities](https://www.securecoding.cert.org/confluence/displa ## Implementation notes -None +This implementation does not attempt to identify unique condition variables and instead advocates for the usage of `cnd_broadcast`. ## References diff --git a/c/cert/src/rules/CON41-C/WrapFunctionsThatCanFailSpuriouslyInLoop.md b/c/cert/src/rules/CON41-C/WrapFunctionsThatCanFailSpuriouslyInLoop.md index da6cf2e1ed..b176e77da2 100644 --- a/c/cert/src/rules/CON41-C/WrapFunctionsThatCanFailSpuriouslyInLoop.md +++ b/c/cert/src/rules/CON41-C/WrapFunctionsThatCanFailSpuriouslyInLoop.md @@ -149,7 +149,7 @@ Search for [vulnerabilities](https://www.securecoding.cert.org/confluence/displa ## Implementation notes -None +This implementation does not attempt to identify a relationship between the condition variable and the atomic operation. ## References diff --git a/c/cert/src/rules/ENV31-C/EnvPointerIsInvalidAfterCertainOperations.md b/c/cert/src/rules/ENV31-C/EnvPointerIsInvalidAfterCertainOperations.md index bb222bfbce..c86861e4b8 100644 --- a/c/cert/src/rules/ENV31-C/EnvPointerIsInvalidAfterCertainOperations.md +++ b/c/cert/src/rules/ENV31-C/EnvPointerIsInvalidAfterCertainOperations.md @@ -218,7 +218,7 @@ Search for vulnerabilities resulting from the violation of this rule on the [CER ## Implementation notes -None +The rule is enforced in the context of a single function. ## References diff --git a/c/cert/src/rules/FIO32-C/DoNotPerformFileOperationsOnDevices.md b/c/cert/src/rules/FIO32-C/DoNotPerformFileOperationsOnDevices.md index b569443fec..bcde34316c 100644 --- a/c/cert/src/rules/FIO32-C/DoNotPerformFileOperationsOnDevices.md +++ b/c/cert/src/rules/FIO32-C/DoNotPerformFileOperationsOnDevices.md @@ -249,7 +249,7 @@ FIO32-C = Union( CWE-67, list) where list = ## Implementation notes -None +The rule checks that filenames are not tainted. It does not verify that appropriate OS-specific checks are in place to exclude that the opened file is a device. ## References diff --git a/c/cert/src/rules/FIO34-C/DistinguishBetweenCharReadFromAFileAndEofOrWeof.md b/c/cert/src/rules/FIO34-C/DistinguishBetweenCharReadFromAFileAndEofOrWeof.md index 6d04ae9354..e872ae8f97 100644 --- a/c/cert/src/rules/FIO34-C/DistinguishBetweenCharReadFromAFileAndEofOrWeof.md +++ b/c/cert/src/rules/FIO34-C/DistinguishBetweenCharReadFromAFileAndEofOrWeof.md @@ -199,7 +199,7 @@ Therefore: FIO34-C = Subset( CWE-197) ## Implementation notes -None +The rule is enforced in the context of a single function. The query does not validate if the FILE status is handled correctly after being read. ## References diff --git a/c/cert/src/rules/FIO34-C/EndOfFileCheckPortability.md b/c/cert/src/rules/FIO34-C/EndOfFileCheckPortability.md index f6d1bdc661..5855bc9092 100644 --- a/c/cert/src/rules/FIO34-C/EndOfFileCheckPortability.md +++ b/c/cert/src/rules/FIO34-C/EndOfFileCheckPortability.md @@ -199,7 +199,7 @@ Therefore: FIO34-C = Subset( CWE-197) ## Implementation notes -None +The rule is enforced in the context of a single function. The query does not validate if the FILE status is handled correctly after being read. ## References diff --git a/c/cert/src/rules/FIO37-C/SuccessfulFgetsOrFgetwsMayReturnAnEmptyString.md b/c/cert/src/rules/FIO37-C/SuccessfulFgetsOrFgetwsMayReturnAnEmptyString.md index 45a3faf210..f39749cf78 100644 --- a/c/cert/src/rules/FIO37-C/SuccessfulFgetsOrFgetwsMayReturnAnEmptyString.md +++ b/c/cert/src/rules/FIO37-C/SuccessfulFgetsOrFgetwsMayReturnAnEmptyString.md @@ -102,7 +102,7 @@ CWE-241 = Union( FIO37-C, list) where list = ## Implementation notes -None +The rule checks that access to a string returned by fgets() or fgetws() if protected by a guard condition. The rule is enforced in the context of a single function. ## References diff --git a/c/cert/src/rules/FIO39-C/DoNotAlternatelyIOFromAStreamWithoutPositioning.md b/c/cert/src/rules/FIO39-C/DoNotAlternatelyIOFromAStreamWithoutPositioning.md index 1289c5b2d8..c2a5d76395 100644 --- a/c/cert/src/rules/FIO39-C/DoNotAlternatelyIOFromAStreamWithoutPositioning.md +++ b/c/cert/src/rules/FIO39-C/DoNotAlternatelyIOFromAStreamWithoutPositioning.md @@ -135,7 +135,7 @@ This CWE is vague on what constitutes “improper control of a resource”. It c ## Implementation notes -None +The rule is enforced in the context of a single function. ## References diff --git a/c/cert/src/rules/FIO42-C/CloseFilesWhenTheyAreNoLongerNeeded.md b/c/cert/src/rules/FIO42-C/CloseFilesWhenTheyAreNoLongerNeeded.md index 9ade9f1fdc..91654e8ee2 100644 --- a/c/cert/src/rules/FIO42-C/CloseFilesWhenTheyAreNoLongerNeeded.md +++ b/c/cert/src/rules/FIO42-C/CloseFilesWhenTheyAreNoLongerNeeded.md @@ -229,7 +229,7 @@ FIO42-C - CWE-403 = SPECIAL_CASES, where SPECIAL_CASES = ## Implementation notes -None +The rule is enforced in the context of a single function. ## References diff --git a/c/cert/src/rules/FIO46-C/UndefinedBehaviorAccessingAClosedFile.md b/c/cert/src/rules/FIO46-C/UndefinedBehaviorAccessingAClosedFile.md index 0e851012c6..bef8cafc81 100644 --- a/c/cert/src/rules/FIO46-C/UndefinedBehaviorAccessingAClosedFile.md +++ b/c/cert/src/rules/FIO46-C/UndefinedBehaviorAccessingAClosedFile.md @@ -68,7 +68,7 @@ Search for [vulnerabilities](https://wiki.sei.cmu.edu/confluence/display/c/BB.+D ## Implementation notes -None +The rule is enforced in the context of a single function. ## References diff --git a/c/cert/src/rules/MSC32-C/ProperlySeedPseudorandomNumberGenerators.md b/c/cert/src/rules/MSC32-C/ProperlySeedPseudorandomNumberGenerators.md index dedaf6d25a..e1e24344c6 100644 --- a/c/cert/src/rules/MSC32-C/ProperlySeedPseudorandomNumberGenerators.md +++ b/c/cert/src/rules/MSC32-C/ProperlySeedPseudorandomNumberGenerators.md @@ -162,7 +162,7 @@ MSC30-C, MSC32-C and CON33-C are independent, they have no intersections. They e ## Implementation notes -None +This rule will be checked by looking for calls to random that are no preceded by a call to srandom(). We perform a simple check for the argument to srandom() and verify it is not a literal (or a value easily deduced to be a literal). ## References diff --git a/c/cert/src/rules/STR31-C/StringsHasSufficientSpaceForTheNullTerminator.md b/c/cert/src/rules/STR31-C/StringsHasSufficientSpaceForTheNullTerminator.md index 76559426cd..dd0fb40f57 100644 --- a/c/cert/src/rules/STR31-C/StringsHasSufficientSpaceForTheNullTerminator.md +++ b/c/cert/src/rules/STR31-C/StringsHasSufficientSpaceForTheNullTerminator.md @@ -475,7 +475,7 @@ Copying string data to a buffer that is too small to hold that data results in a Array access out of bounds, Buffer overflow from incorrect string format specifier, Destination buffer overflow in string manipulation, Invalid use of standard library string routine, Missing null in string array, Pointer access out of bounds, Tainted NULL or non-null-terminated string, Use of dangerous standard function -
Tool | Version | Checker | Description |
---|---|---|---|
Astrée | 22.04 | Supported Astrée reports all buffer overflows resulting from copying data to a buffer that is not large enough to hold that data. | |
Axivion Bauhaus Suite | 7.2.0 | CertC-STR31 | Detects calls to unsafe string function that may cause buffer overflow Detects potential buffer overruns, including those caused by unsafe usage of fscanf() |
CodeSonar | 7.0p0 | LANG.MEM.BO LANG.MEM.TO MISC.MEM.NTERM BADFUNC.BO.\* | Buffer overrun Type overrun No space for null terminator A collection of warning classes that report uses of library functions prone to internal buffer overflows |
Compass/ROSE | Can detect violations of the rule. However, it is unable to handle cases involving strcpy_s() or manual string copies such as the one in the first example | ||
Coverity | 2017.07 | STRING_OVERFLOW BUFFER_SIZE OVERRUN STRING_SIZE | Fully implemented |
Fortify SCA | 5.0 | ||
Helix QAC | 2022.2 | C2840, C2841, C2842, C2843, C2845, C2846, C2847, C2848, C2930, C2931, C2932, C2933, C2935, C2936, C2937, C2938 C++0145, C++2840, C++2841, C++2842, C++2843, C++2845, C++2846, C++2847, C++2848, C++2930, C++2931, C++2932, C++2933, C++2935, C++2936, C++2937, C++2938 | |
Klocwork | 2022.2 | SV.FMT_STR.BAD_SCAN_FORMAT SV.UNBOUND_STRING_INPUT.FUNC | |
LDRA tool suite | 9.7.1 | 489 S, 109 D, 66 X, 70 X, 71 X | Partially implemented |
Parasoft C/C++test | 2022.1 | CERT_C-STR31-a CERT_C-STR31-b CERT_C-STR31-c CERT_C-STR31-d CERT_C-STR31-e | Avoid accessing arrays out of bounds Avoid overflow when writing to a buffer Prevent buffer overflows from tainted data Avoid buffer write overflow from tainted data Avoid using unsafe string functions which may cause buffer overflows |
PC-lint Plus | 1.4 | 421, 498 | Partially supported |
Polyspace Bug Finder | R2022a | CERT C: Rule STR31-C | Checks for: Use of dangerous standard functionse of dangerous standard function, missing null in string arrayissing null in string array, buffer overflow from incorrect string format specifieruffer overflow from incorrect string format specifier, destination buffer overflow in string manipulationestination buffer overflow in string manipulation, tainted null or non-null-terminated stringainted null or non-null-terminated string. Rule partially covered. |
PRQA QA-C | 9.7 | 5009, 5038, 2840, 2841, 2842, 2843, 2845, 2846, 2847, 2848, 2930, 2931, 2932, 2933, 2935, 2936, 2937, 2938 | Partially implemented |
PRQA QA-C++ | 4.4 | 0145, 2840, 2841, 2842, 2843, 2845, 2846, 2847, 2848, 2930, 2931, 2932, 2933, 2935, 2936, 2937, 2938, 5006, 5038 | |
PVS-Studio | 7.19 | V518 , V645 , V727 , V755 | |
Splint | 3.1.1 | ||
TrustInSoft Analyzer | 1.38 | mem_access | Exhaustively verified (see one compliant and one non-compliant example ). |
Tool | Version | Checker | Description |
---|---|---|---|
Astrée | 22.04 | Supported Astrée reports all buffer overflows resulting from copying data to a buffer that is not large enough to hold that data. | |
Axivion Bauhaus Suite | 7.2.0 | CertC-STR31 | Detects calls to unsafe string function that may cause buffer overflow Detects potential buffer overruns, including those caused by unsafe usage of fscanf() |
CodeSonar | 7.0p0 | LANG.MEM.BO LANG.MEM.TO MISC.MEM.NTERM BADFUNC.BO.\* | Buffer overrun Type overrun No space for null terminator A collection of warning classes that report uses of library functions prone to internal buffer overflows |
Compass/ROSE | Can detect violations of the rule. However, it is unable to handle cases involving strcpy_s() or manual string copies such as the one in the first example | ||
Coverity | 2017.07 | STRING_OVERFLOW BUFFER_SIZE OVERRUN STRING_SIZE | Fully implemented |
Fortify SCA | 5.0 | ||
Helix QAC | 2022.2 | C2840, C2841, C2842, C2843, C2845, C2846, C2847, C2848, C2930, C2931, C2932, C2933, C2935, C2936, C2937, C2938 C++0145, C++2840, C++2841, C++2842, C++2843, C++2845, C++2846, C++2847, C++2848, C++2930, C++2931, C++2932, C++2933, C++2935, C++2936, C++2937, C++2938 | |
Klocwork | 2022.2 | SV.FMT_STR.BAD_SCAN_FORMAT SV.UNBOUND_STRING_INPUT.FUNC | |
LDRA tool suite | 9.7.1 | 489 S, 109 D, 66 X, 70 X, 71 X | Partially implemented |
Parasoft C/C++test | 2022.1 | CERT_C-STR31-a CERT_C-STR31-b CERT_C-STR31-c CERT_C-STR31-d CERT_C-STR31-e | Avoid accessing arrays out of bounds Avoid overflow when writing to a buffer Prevent buffer overflows from tainted data Avoid buffer write overflow from tainted data Avoid using unsafe string functions which may cause buffer overflows |
PC-lint Plus | 1.4 | 421, 498 | Partially supported |
Polyspace Bug Finder | R2022a | CERT C: Rule STR31-C | Checks for: Use of dangerous standard functionse of dangerous standard function, missing null in string arrayissing null in string array, buffer overflow from incorrect string format specifieruffer overflow from incorrect string format specifier, destination buffer overflow in string manipulationestination buffer overflow in string manipulation, tainted null or non-null-terminated stringainted null or non-null-terminated string. Rule partially covered. |
PRQA QA-C | 9.7 | 5009, 5038, 2840, 2841, 2842, 2843, 2845, 2846, 2847, 2848, 2930, 2931, 2932, 2933, 2935, 2936, 2937, 2938 | Partially implemented |
PRQA QA-C++ | 4.4 | 0145, 2840, 2841, 2842, 2843, 2845, 2846, 2847, 2848, 2930, 2931, 2932, 2933, 2935, 2936, 2937, 2938, 5006, 5038 | |
PVS-Studio | 7.20 | V518 , V645 , V727 , V755 | |
Splint | 3.1.1 | ||
TrustInSoft Analyzer | 1.38 | mem_access | Exhaustively verified (see one compliant and one non-compliant example ). |