使用Ada和SPARK的安全加固软件库--一个TCP堆栈用例
Security-Hardening Software Libraries with Ada and SPARK -- A TCP Stack Use Case
摘要:
本白皮书演示了如何通过采用SPARK技术,显著增强以C程序设计语言编写的现有专业级开源嵌入式TCP/IP堆栈实现的保证、可靠性和安全性。一个多方面的方法实现了这一点。首先,TCP层的C代码被正式验证的SPARK所取代,SPARK是形式化验证工具支持的Ada程序设计语言的子集。然后,仍然用C编写的TCP层所依赖的较低层使用SPARK合同进行建模,并使用KLEE符号执行进行验证。最后,上层的正式合同被定义为调用TCP层。这项工作允许检测和纠正TCP层中的两个错误。在一个日益互联的世界中,网络安全至关重要,本工作中详细介绍的强大方法可以应用于任何现有的关键C库,以显著增强其可靠性和安全性。
英文摘要:
This white paper demonstrates how the assurance, reliability, and security of an existing professional-grade, open-source embedded TCP/IP stack implementation written in the C programming language is significantly enhanced by adopting the SPARK technology. A multifaceted approach achieves this. Firstly, the TCP layer's C code is being replaced with formally verified SPARK, a subset of the Ada programming language supported by formal verification tools. Then the lower layers, still written in C and on which the TCP layer depends, are modeled using SPARK contracts and validated using symbolic execution with KLEE. Finally, formal contracts for the upper layers are defined to call the TCP layer. The work allowed the detection and correction of two bugs in the TCP layer. In an increasingly connected world, where Cyber Security is of paramount importance, the powerful approach detailed in this work can be applied to any existing critical C library to harden their reliability and security significantly.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。