Common C/C++ Vulnerabilities: A Practical Guide to Prevention | Blog | Endor Labs
Endor Labs guide to C/C++ memory-safety and input-handling vulnerabilities — buffer overflow (CWE-787/120/121), use-after-free (CWE-416), null pointer dereference (CWE-476), integer overflow (CWE-190), and format string bugs (CWE-134) — with vulnerable/fixed code snippets for each. It surveys detection tooling (Coverity, CodeQL, Clang Static Analyzer, AFL++/libFuzzer with ASan/UBSan, OSS-Fuzz) and argues that build-system complexity (Bazel, CMake, Conan, vcpkg) and high SAST false-positive rates make reachability analysis necessary, closing with a pitch for Endor Labs' AURI reachability engine.
TL;DR Endor Labs walks through the top C/C++ CWEs (buffer overflow, UAF, null deref, integer overflow, format string) and detection techniques, then pitches reachability analysis to cut SAST/SCA false positives.
Organisations named here
- CWE-120
- CWE-121
- CWE-134
- CWE-416
- CWE-476
- CWE-787
Technologies named here
- C/C++ codebases
- Coverity
- Chrome
- CodeQL
- Firefox
- Clang Static Analyzer
- Operating system kernels
- AFL++
- libFuzzer
- AddressSanitizer
- UndefinedBehaviorSanitizer
- OSS-Fuzz
- Bazel
- CMake
- Conan
- vcpkg
- CPM
- AURI
- Endor Labs
- C++
Techniques named here
- Buffer Overflow / Out-of-Bounds Write
- Use-after-free
- Double Free
- Null-pointer dereference
- Integer Overflow
- Format String Attack
- Static Application Security Testing
- Software composition analysis
- Fuzz testing
- Reachability analysis
- Taint Analysis
- Binary analysis / symbol table inspection
- Integer Overflow or Wraparound
Related in AppSec
Flowise MCP Security Bypass Enables RCE
Inside an Oracle Database SQL Injection Attack | Huntress
OASIS
