...
Dereferencing a null pointer is undefined behavior, typically abnormal program termination. In some situations, however, dereferencing a null pointer can lead to the execution of arbitrary code [Jack 2007, van Sprundel 2006]. The indicated severity is for this more severe case; on platforms where it is not possible to exploit a null pointer dereference to execute arbitrary code, the actual severity is low.
Rule | Severity | Likelihood |
|---|
Detectable | Repairable | Priority | Level |
|---|---|---|---|
STR51-CPP | High | Likely | No |
Yes | P18 | L1 |
Automated Detection
Tool | Version | Checker | Description |
|---|
| Astrée |
| assert_failure | |||||||
| CodeSonar |
| LANG.MEM.NPD | Null Pointer Dereference | ||||||
| Helix QAC |
| DF4770, DF4771, DF4772, DF4773, DF4774 | |||||||
| Klocwork |
| NPD.CHECK.CALL.MIGHT | |||||||
| Parasoft C/C++test |
| CERT_CPP-STR51-a | Avoid null pointer dereferencing | ||||||
| Polyspace Bug Finder |
| CERT C++: STR51-CPP | Checks for string operations on null pointer (rule partially covered). | ||||||
| Security Reviewer - Static Reviewer |
| shiftTooManyBits | Fully implemented |
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
Related Guidelines
Bibliography
| [ISO/IEC 9899:2011] | Subclause 7.20.3, "Memory Management Functions" |
| [ISO/IEC 14882-2014] | Subclause 21.2.1, "Character Trait Requirements" |
| [Jack 2007] |
| [van Sprundel 2006] |
...
...