arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.09110cs.CRcs.SE
收藏

OriginPruner:利用方法起源进行有指导的调用图剪枝

OriginPruner: Leveraging Method Origins for Guided Call Graph Pruning

Amir M. Mir, Mehdi Keshani, Sebastian Proksch

AI总结:

针对静态调用图过近似导致规模大、精度低,且现有ML剪枝方法泛化难、成本高的问题,提出OriginPruner技术,利用方法起源和局部性分析剪枝,在保证安全分析可靠性的同时大幅缩减调用图规模且开销极低。

摘要:

大多数静态程序分析依赖调用图(Call Graphs, CGs),包括安全漏洞可达性分析。静态调用图通过过近似保证可靠性,这会导致规模膨胀和精度不足。近期研究采用机器学习(ML)模型剪枝虚假边以提升调用图精度,但这些模型需要测试覆盖率高的真实程序才能有效泛化,且推理成本高昂。本文提出OriginPruner,一种新型调用图剪枝技术,它利用方法起源——即方法签名在类层次结构中首次被引入的位置。通过将研究方法交互范围的局部性分析见解融入我们的方法,OriginPruner能够可靠地识别并剪枝与这些起源方法相关的边。我们的核心发现表明:(1)主流起源方法(如Iterator.next)对调用图规模有显著影响;(2)这些起源方法的派生方法主要是局部的,可在不影响下游过程间分析的前提下安全剪枝;(3)OriginPruner在保持调用图用于漏洞传播分析等安全应用的可靠性的同时,大幅缩减了调用图规模;(4)OriginPruner引入的计算开销极低。这些发现凸显了利用类型系统领域知识实现更高效调用图剪枝的潜力,为静态程序分析的未来研究提供了有前景的方向。

英文摘要:

Most static program analyses depend on Call Graphs (CGs), including reachability of security vulnerabilities. Static CGs ensure soundness through over-approximation, which results in inflated sizes and imprecision. Recent research has employed machine learning (ML) models to prune false edges and enhance CG precision. However, these models require real-world programs with high test coverage to generalize effectively and the inference is expensive. In this paper, we present OriginPruner, a novel call graph pruning technique that leverages the method origin, which is where a method signature is first introduced within a class hierarchy. By incorporating insights from a localness analysis that investigated the scope of method interactions into our approach, OriginPruner confidently identifies and prunes edges related to these origin methods. Our key findings reveal that (1) dominant origin methods, such as Iterator.next, significantly impact CG sizes; (2) derivatives of these origin methods are primarily local, enabling safe pruning without affecting downstream inter-procedural analyses; (3) OriginPruner achieves a significant reduction in CG size while maintaining the soundness of CGs for security applications like vulnerability propagation analysis; and (4) OriginPruner introduces minimal computational overhead. These findings underscore the potential of leveraging domain knowledge about the type system for more effective CG pruning, offering a promising direction for future work in static program analysis.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑