计算机科学 ›› 2024, Vol. 51 ›› Issue (6A): 230900115-6.doi: 10.11896/jsjkx.230900115
严瑞1, 陈哲1,2
YAN Rui1, CHEN Zhe1,2
摘要: 随着软件结构越来越复杂以及其要求更高级别的并发量,出现了越来越多的多线程程序,同时C语言程序缺乏检测其内存安全的能力,进而导致C语言实现的程序可能会存在较多的隐藏漏洞,因此对多线程C程序的内存安全检测尤为的重要。较为前沿且可靠的检测内存安全的技术主要为动态分析技术,且现在对于多线程C程序内存安全检测的工具不是特别完善,错误检测不完全,性能不是很高。因此提出了基于指针的动态分析技术,同时结合无锁技术、源代码插桩技术实现了工具Movec来对多线程C程序的内存安全性进行检测,并且选取专业测试集来进行实验,验证了本工具对于多线程C程序检测内存安全是有效的,检测的错误更多且性能较为优秀。
中图分类号:
[1]CHEN Z,TAO C Q,ZHANG Z Y,et al.Beyond spatial and temporal memory safety[C]//Proceedings of the 40th International Conference on Software Engineering(ICSE 2018),Companion Volume.ACM,2018:189-190. [2]XU W,DUVARNEY D C,SEKAR R.An efficient and back-wards-compatible transformation to ensure memory safety of C programs[C]//Proceedings of the 12th ACM SIGSOFT Twelfth International Symposium on Foundations of Software Engineering.2004:117-126. [3]NETHERCOTE N,SEWARD J.How to shadow every byte of memory used by a program[C]//Proceedings of the 3rd International Conference on Virtual Execution Environments(VEE 2007).ACM,2007:65-74. [4]NAGARAKATTE S,ZHAO J Z,MARTIN M M K,et al.SoftBound:highly compatible and complete spatial memory safety for C[C]//Proceedings of the 2009 ACM SIGPLAN Conference on Programming Language Design and Implementation(PLDI 2009).ACM,2009:245-258. [5]SIMPSON M S,BARUA R K.MemSafe:ensuring the spatial and temporal memory safety of C at runtime[J].Software:Practice and Experience,2013,43(1):93-128. [6]CHEN Z,WANG C,YAN J Q,et al.Runtime Detection ofMemory Errors with Smart Status[C]//Proceedings of the 30th ACM SIGSOFT International Symposium on Software Testing and Analysis(ISSTA 2021).Virtual,Denmark,ACM,2021:296-308. [7]CHEN Z,YAN J Q,KAN S L,et al.Detecting Memory Errorsat Runtime with Source-Level Instrumentation[C]//Procee-dings of the 28th ACM SIGSOFT International Symposium on Software Testing and Analysis(ISSTA 2019).Beijing,China,ACM,2019:341-351. [8]CHEN Z,YAN J Q,LI W M,et al.Runtime verification ofmemory safety via source transformation[C]//Proceedings of the 40th International Conference on Software Engineering(ICSE 2018),Companion Volume.ACM,2018:264-265. [9]MA R,CHEN L,HU C,et al.A dynamic detection method to C/C++ programs memory vulnerabilities based on pointer analysis[C]//2013 IEEE 11th International Conference on Dependable,Autonomic and Secure Computing.IEEE,2013:52-57. [10]SEREBRYANY K,BRUENING D,POTAPENKO A,et al.AddressSanitizer:A fast address sanity checker[C]//2012 {USENIX} Annual Technical Conference({USENIX}ATC} 12).2012:309-318. [11]NETHERCOTE N,SEWARD J.Valgrind:A program supervi-sion framework[J].Electronic Notes in theoretical Computer Science,2003,89(2):44-66. [12]NETHERCOTE N,SEWARD J.Valgrind:a framework forheavyweight dynamic binary instrumentation[C]//Proceedings of the ACM SIGPLAN 2007 Conference on Programming Language Design and Implementation(PLDI 2007).ACM,2007:89-100. |
|