C/C++ Patterns
45+ vulnerability patterns for C and C++ applications including buffer overflows, memory corruption, and format string vulnerabilities.
Memory Safety Critical
C/C++ require careful memory management. These patterns represent the most common sources of security vulnerabilities in native code.
Overview
Bloodhound provides comprehensive analysis for C and C++ code, detecting memory safety issues, undefined behavior, and common vulnerability patterns.
15
Critical
14
High
10
Medium
6
Low
Buffer Overflow
Critical
Stack Buffer Overflow
Writing beyond stack buffer bounds enables code execution.
Vulnerable
C
Secure
C
Critical
Heap Buffer Overflow
Overflowing heap buffers can corrupt heap metadata.
Vulnerable
C
Secure
C
Memory Corruption
Critical
Use After Free
Accessing memory after deallocation leads to undefined behavior.
Vulnerable
C
Secure
C
Critical
Double Free
Freeing the same memory twice corrupts heap metadata.
Vulnerable
C
Secure
C
High
Null Pointer Dereference
Dereferencing NULL causes crashes or security issues.
Vulnerable
C
Secure
C
Format String
Critical
Format String Vulnerability
User-controlled format strings enable memory read/write.
Vulnerable
C
Secure
C
Integer Vulnerabilities
High
Integer Overflow
Arithmetic overflow wraps around, causing unexpected behavior.
Vulnerable
C
Secure
C
Medium
Signed/Unsigned Mismatch
Mixing signed and unsigned types causes unexpected comparisons.
Vulnerable
C
Secure
C
Modern C++ Practices
Prefer smart pointers (unique_ptr, shared_ptr), std::string, std::vector, and RAII patterns over raw pointers and manual memory management.