Емпіричний аналіз вразливостей пам’яті в C++ із використанням засобів динамічного та статистичного аналізу

Authors

DOI:

https://doi.org/10.15330/itee.2026.4.09

Keywords:

C++, memory safety, Address Sanitizer, Undefined Behavior Sanitizer, static analysis, dynamic analysis, memory vulnerabilities, secure programming, DevSecOps, information security

Abstract

The work presents an empirical study of the effectiveness of modern approaches to detecting memory vulnerabilities in software developed in C++. The relevance of this research is determined by the fact that memory management errors remain one of the primary causes of critical security defects, including buffer overflows, use-after-free vulnerabilities, dangling pointers, and undefined program behavior. The study examines contemporary memory safety techniques, including static analysis, runtime analysis using sanitizers, and automated testing.
The objective of the study is to evaluate the practical effectiveness of compiler diagnostics, AddressSanitizer (ASan), and Undefined Behavior Sanitizer (UBSan) in the analysis of production-ready open-source C++ projects. Three widely used libraries were selected for the experiment: fmt, spdlog, and nlohmann/json. The research was conducted in a Linux environment using GCC 13.3 and Clang 18.1.3 compilers. The experimental methodology included static analysis of compiler warnings, dynamic testing using sanitizer instrumentation, and normalization of the obtained results per 10,000 lines of industrial-grade source code.
The obtained results indicate that compiler warnings do not exhibit a direct correlation with actual runtime memory defects. The largest number of diagnostics was observed in the fmt library; however, the baseline dynamic analysis did not reveal any defects associated with memory corruption or undefined behavior. No compiler warnings or sanitizer reports were detected for the spdlog and nlohmann/json libraries. The study also identified a compatibility issue involving sanitizer runtime components in GCC and Clang when using a mixed toolchain configuration.
The practical significance of the research lies in demonstrating the effectiveness of combining compiler diagnostics, dynamic analysis tools, and automated testing to enhance memory safety in modern C++ projects. The findings may be applied in the development of secure CI/CD pipelines, DevSecOps practices, and automated software security assessment systems.
The conducted research is also aligned with the United Nations Sustainable Development Goal 9 (Industry, Innovation and Infrastructure), as it contributes to improving the security and resilience of modern digital infrastructure through the advancement of memory vulnerability detection methods in system software.

References

V. E. Moghadam, “Memory integrity techniques for memory-unsafe languages: A survey,” Scuola Supe-riore Sant'Anna, Pisa, Italy, Tech. Rep., 2024. [Online]. URL: https://iris.santannapisa.it/retrieve/9ebf4c27-86fb-401c-827b-6fad063f1d08/Memory_Integrity_Techniques_for_Memory-Unsafe_Languages_A_Survey.pdf

R. C. Seacord, Secure Coding in C and C++, 2nd ed. Boston, MA, USA: Addison-Wesley, 2013.

“The case for memory safe roadmaps,” Cybersecurity and Infrastructure Security Agency (CISA), CISA, Washington, DC, USA, Tech. Rep., 2023. [Online]. URL: https://www.cisa.gov/resources-tools/resources/case-memory-safe-roadmaps

“Programming Languages — C,” ISO/IEC 9899:2018, International Organization for Standardization, Ge-neva, Switzerland, 2018. [Online]. URL: https://www.iso.org/standard/74528.html .

“Programming Languages — C++,” ISO/IEC 14882:2024, International Organization for Standardization, Geneva, Switzerland, 2024. [Online]. URL: https://www.iso.org/standard/83626.html .

“OWASP Top 10: The ten most critical web application security risks,” OWASP Foundation, 2021. [Online]. URL: https://owasp.org/www-project-top-ten/

“CWE-119: Improper restriction of operations within the bounds of a memory buffer,” MITRE, Common Weakness Enumeration, 2024. [Online]. URL: https://cwe.mitre.org/data/definitions/119.html

D. S. Wallach and B. Lord, “A viewpoint: A memory safety manifesto,” IEEE Secur. Privacy, vol. 22, no. 4, pp. 18–21, Jul.–Aug. 2024. doi: https://doi.org/10.1109/MSEC.2024.3409934.

C. Cowan, C. Pu, D. Maier, J. Walpole, P. Bakke, S. Beattie, A. Grier, P. Wagle, Q. Zhang, and H. Hinton, “Buffer overflows: Attacks and defenses for the vulnerability of the decade,” in Proc. DARPA Inf. Survivability Conf. Expo. (DISCEX), Hilton Head, SC, USA, 2000, pp. 119–129. doi: https://doi.org/10.1109/FITS.2003.1264935 .

X. Yang, Y. Chen, E. Eide, and J. Regehr, “Finding and understanding bugs in C compilers,” in Proc. 32nd ACM SIGPLAN Conf. Program. Lang. Des. Implement. (PLDI), San Jose, CA, USA, 2011, pp. 283–294. doi: https://doi.org/10.1145/1993498.1993532.

“AddressSanitizer documentation,” LLVM Project, Clang Documentation, 2024. [Online]. URL: https://clang.llvm.org/docs/AddressSanitizer.html .

A. Bessey, K. Block, B. Chelf, A. Chou, B. Fulton, S. Hallem, C. Henri-Gros, A. Kalgren, C. Kaner, F. Samsky, and D. Engler, “A few billion lines of code later: Using static analysis to find bugs in the real world,” Commun. ACM, vol. 53, no. 2, pp. 66–75, Feb. 2010. doi: https://doi.org/10.1145/1646353.1646374.

“American fuzzy lop (AFL) fuzzer,” M. Zalewski, 2023. [Online]. URL: https://lcamtuf.coredump.cx/afl/

M. Verdi, D. C. D’Elia, and C. Demetrescu, “An empirical study of C++ vulnerabilities in crowd-sourced code examples,” arXiv:1910.01321, 2019. doi: https://doi.org/10.48550/arXiv.1910.01321.

R. I. Zapukhlyak and V. V. Dovhyi, “Memory safety in C++: WG21 initiatives (lifetime, contracts, safety profiles) and empirical analysis of open-source projects,” (in Ukrainian), Inf. Technol. Electron. Eng., no. 2, pp. 44–50, Jun. 2025. doi: https://doi.org/10.15330/itee.2025.2.05.

“Buffer overflow attack,” OWASP Foundation, OWASP Community, 2023. [Online]. URL: https://owasp.org/www-community/attacks/Buffer_overflow_attack

“C++ Core Guidelines,” B. Stroustrup and H. Sutter, Eds., Standard C++ Foundation, 2024. [Online]. URL: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines

K. Serebryany, D. Bruening, A. Potapenko, and D. Vyukov, “AddressSanitizer: A fast address sanity checker,” in Proc. 2012 USENIX Annu. Tech. Conf. (USENIX ATC 12), Boston, MA, USA, 2012, pp. 309–318.

“UndefinedBehaviorSanitizer documentation,” LLVM Project, Clang Documentation, 2024. [Online]. URL: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html

N. S. P. K. Yadati, “Integrating dynamic security testing tools into CI/CD pipelines: A continuous security testing case study,” Int. J. Sci. Res. (IJSR), vol. 10, no. 6, pp. 1403–1405, 2021. doi: https://doi.org/10.21275/SR24615152732.

Published

2026-06-30

How to Cite

Zapukhlyak, Ruslan, et al. “Емпіричний аналіз вразливостей пам’яті в C++ із використанням засобів динамічного та статистичного аналізу”. Information Technologies and Engineering Electronics, no. 4, June 2026, pp. 73-82, doi:10.15330/itee.2026.4.09.