Refactoring the FreeBSD Kernel with Checked C

Refactoring the FreeBSD Kernel with Checked C
复制标题

使用 Checked C 重构 FreeBSD 内核

DOI:
--
复制
发表时间:
2020
期刊:
IEEE Cybersecurity Development
影响因子:
--
通讯作者:
J. Criswell
J. Criswell
中科院分区:
--
文献类型:
--
作者:
Junhan Duan;Yudi Yang;Jie Zhou;J. Criswell

文献摘要

被引文献

相似文献

大多数现代操作系统内核都是用C编写的,这使得它们容易受到缓冲区溢出和缓冲区过度读取攻击。微软已经开发了一个名为C语言的扩展,它提供了新的源语言结构,允许编译器通过静态分析和运行时检查插入来防止NULL指针解引用和空间内存安全错误。我们通过重构FreeBSD内核的一部分来评估在操作系统内核代码中使用CNOC的情况。我们描述了我们的经验重构的代码,实现系统调用和UDP和IP网络。然后,我们评估重构的努力和重构内核的性能。两名本科生花了大约三个月的时间重构系统调用、网络数据包(mbuf)实用程序例程以及部分IP和UDP处理代码。我们的实验表明,使用CNOC不会产生性能或代码大小的开销。
Most modern operating system kernels are written in C, making them vulnerable to buffer overflow and buffer over-read attacks. Microsoft has developed an extension to the C language named Checked C which provides new source language constructs that allow the compiler to prevent NULL pointer dereferences and spatial memory safety errors through static analysis and run-time check insertion. We evaluate the use of Checked C on operating system kernel code by refactoring parts of the FreeBSD kernel to use Checked C extensions. We describe our experience refactoring the code that implements system calls and UDP and IP networking. We then evaluate the refactoring effort and the performance of the refactored kernel. It took two undergraduate students approximately three months to refactor the system calls, the network packet (mbuf) utility routines, and parts of the IP and UDP processing code. Our experiments show that using Checked C incurred no performance or code size overheads.