Modern software often struggles with bloat, leading to increased memory consumption and security vulnerabilities from unused code. In response, various program debloating techniques have been developed, typically utilizing test cases that represent functionalities users want to retain. These methods range from aggressive approaches, which prioritize maximal code reduction but may overfit to test cases and potentially reintroduce past security issues, to conservative strategies that aim to preserve all influenced code, often at the expense of less effective bloat reduction and security improvement. In this research, we present RLDebloatDU, an innovative debloating technique that employs 1-DU chain minimality within abstract syntax trees. Our approach maintains essential program data dependencies, striking a balance between aggressive code reduction and the preservation of program semantics. We evaluated RLDebloatDU on ten Linux kernel programs, comparing its performance with two leading debloating techniques: Chisel, known for its aggressive debloating approach, and Razor, recognized for its conservative strategy. RLDebloatDU significantly lowers the incidence of Common Vulnerabilities and Exposures (CVEs) and improves soundness compared to both, highlighting its efficacy in reducing security issues without reintroducing resolved security issues.
翻译:现代软件常因代码臃肿导致内存消耗增加,且未使用代码会引入安全漏洞。为此,学界提出了多种程序瘦身技术,通常利用代表用户所需功能的测试用例。这些方法涵盖激进策略(优先实现最大化代码缩减,但可能过度拟合测试用例并重新引入过往安全问题)与保守策略(旨在保留所有受影响的代码,却往往以降低瘦身效果和安全改进为代价)。本研究提出RLDebloatDU——一种基于抽象语法树中1-DU链最小化的创新瘦身技术。该方法在保持程序核心数据依赖关系的同时,实现了激进代码缩减与程序语义保留间的平衡。我们在十个Linux内核程序上对RLDebloatDU进行评估,并与两种主流瘦身技术(激进型Chisel与保守型Razor)进行对比。实验表明,RLDebloatDU显著降低了通用漏洞披露(CVE)发生率,同时提升了健全性,在减少安全问题的同时避免重新引入已解决的安全漏洞。