引用本文:王子成,郭迎港,钟炳南,陈越琦,曾庆凯.基于eBPF的内核堆漏洞动态缓解机制.软件学报,2024,35(7):3332-3354
【打印本页】   【下载PDF全文】   查看/发表评论  【EndNote】   【RefMan】   【BibTex】
←前一篇|后一篇→ 过刊浏览    高级检索
本文已被:浏览 1843次   下载 3239 本文二维码信息
码上扫一扫!
分享到: 微信 更多
基于eBPF的内核堆漏洞动态缓解机制
王子成1,2, 郭迎港1,2, 钟炳南1,2, 陈越琦3, 曾庆凯1,2
1.计算机软件新技术国家重点实验室(南京大学), 江苏 南京 210023;2.南京大学 计算机科学与技术系, 江苏 南京 210023;3.Department of Computer Science, University of Colorado Boulder, Boulder 80309, USA
摘要:
内核堆漏洞是目前操作系统安全的主要威胁之一, 用户层攻击者通过触发漏洞能够泄露或修改内核敏感信息, 破坏内核控制流, 甚至获取root权限. 但是由于漏洞的数量和复杂性剧增, 从漏洞首次被报告到开发者给出修复补丁(patch)往往需要较长时间, 而内核现阶段采用的缓解机制均能被稳定绕过. 为此提出一种基于eBPF的内核堆漏洞动态缓解框架, 用于在修复时间窗口中降低内核安全风险. 动态缓解框架采取数据对象空间随机化策略, 在每次分配时为漏洞报告中涉及的数据对象分配随机地址, 并充分利用eBPF的动态、安全特性将空间随机化对象在运行时注入内核, 使得攻击者无法准确放置攻击负载, 堆漏洞几乎无法被利用. 评估40个真实内核堆漏洞, 并收集12个绕过现有缓解机制的攻击程序进行进一步分析和实验, 证实动态缓解框架提供充足的安全性. 性能测试表明, 即使在严苛情况下, 大量分配的4类数据对象仅对系统造成约1%的性能损耗和可以忽略不计的内存损耗, 同时增加保护对象的数量几乎不引入额外性能损耗. 所提机制对比相关工作适用范围更广, 安全性更强, 而且无需安全专家发布的漏洞补丁, 可以根据漏洞报告生成缓解程序, 具备广阔应用前景.
关键词:  系统安全  漏洞缓解  eBPF
DOI:10.13328/j.cnki.jos.006923
分类号:TP311
基金项目:国家自然科学基金(61772266, 61431008)
Dynamic Mitigation Solution Based on eBPF Against Kernel Heap Vulnerabilities
WANG Zi-Cheng1,2, GUO Ying-Gang1,2, ZHONG Bing-Nan1,2, CHEN Yue-Qi3, ZENG Qing-Kai1,2
1.State Key Laboratory for Novel Software Technology (Nanjing University), Nanjing 210023, China;2.Department of Computer Science and Technology, Nanjing University, Nanjing 210023, China;3.Department of Computer Science, University of Colorado Boulder, Boulder 80309, USA
Abstract:
Kernel heap vulnerability is currently one of the main threats to operating system security. User-space attackers can leak or modify sensitive kernel information, disrupt kernel control flow, and even gain root privilege by triggering a vulnerability. However, due to the rapid increase in the number and complexity of vulnerabilities, it often takes a long time from when a vulnerability is first reported to when the developer issues a patch, and kernel mitigation mechanisms currently adopted are usually steadily bypassed. Therefore, this study proposes an eBPF-based dynamic mitigation framework for kernel heap vulnerabilities, so as to reduce kernel security risks during the time window fixing. The framework adopts data object space randomization to assign random addresses to the data objects involved in vulnerability reports at each allocation. In addition, it takes full advantage of the dynamic and secure features of eBPF to inject space-randomized objects into the kernel during runtime, so the attacker cannot place any attack payload accurately, and the heap vulnerabilities are almost unexploitable. This study evaluates 40 real kernel heap vulnerabilities and collects 12 attacks that bypass the existing mitigation mechanisms for further analysis and tests. As a result, it verifies that the dynamic mitigation framework provides sufficient security. Performance tests show that even under severe conditions, the four types of data objects only cause performance loss of about 1% and negligible memory loss to the system, and there is almost no additional performance loss when the number of protected objects increases. Compared with related work, the mechanism in this study has a wider scope of application and stronger security, and it does not require vulnerability patches issued by security experts. Furthermore, it can generate mitigation procedures according to vulnerability reports and has a broad application prospect.
Key words:  system security  vulnerability mitigation  eBPF