arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2512.14045cs.CRcs.LGcs.PL
收藏

深入探讨函数内联及其对基于机器学习的二进制分析的安全影响

A Deep Dive into Function Inlining and its Security Implications for ML-based Binary Analysis

Sungkyunkwan University, South Korea(首尔国立大学)

Omar Abusabha, Jiyong Uhm, Tamer Abuhmed, Hyungjoon Koo

AI总结:

本文探讨了函数内联对基于机器学习的二进制分析安全性的潜在影响,揭示了内联对ML模型行为的间接影响及不同应用中内联比率的差异。

摘要:

函数内联优化是现代编译器中广泛使用的转换,它在需要时用被调用函数的主体替换调用站点。虽然这种转换提高了性能,但显著影响了静态特征,如机器指令和控制流图,这对于二进制分析至关重要。然而,尽管其广泛的影响,函数内联的安全影响至今仍未被充分探讨。在本文中,我们通过基于机器学习的二进制分析的视角,首次全面研究了函数内联。为此,我们解构了LLVM中的成本模型中的内联决策流程,并探索了促进函数内联比率超过标准优化水平的编译器选项组合,我们称之为极端内联。我们专注于五个基于机器学习的二进制分析任务以安全为目的,使用20种独特的模型,系统地评估其在极端内联场景下的鲁棒性。我们的广泛实验揭示了几个重要的发现:i) 函数内联,虽然在意图上是一种良性转换,但可以(间接)影响ML模型的行为,可能被用来逃避判别或生成ML模型;ii) 依赖静态特征的ML模型对内联非常敏感;iii) 精细的编译器设置可以被用来故意制造逃避的二进制变体;iv) 在线程中内联比率在不同应用和构建配置中差异显著,破坏了训练和评估ML模型的一致性假设。

英文摘要:

A function inlining optimization is a widely used transformation in modern compilers, which replaces a call site with the callee's body in need. While this transformation improves performance, it significantly impacts static features such as machine instructions and control flow graphs, which are crucial to binary analysis. Yet, despite its broad impact, the security impact of function inlining remains underexplored to date. In this paper, we present the first comprehensive study of function inlining through the lens of machine learning-based binary analysis. To this end, we dissect the inlining decision pipeline within the LLVM's cost model and explore the combinations of the compiler options that aggressively promote the function inlining ratio beyond standard optimization levels, which we term extreme inlining. We focus on five ML-assisted binary analysis tasks for security, using 20 unique models to systematically evaluate their robustness under extreme inlining scenarios. Our extensive experiments reveal several significant findings: i) function inlining, though a benign transformation in intent, can (in)directly affect ML model behaviors, being potentially exploited by evading discriminative or generative ML models; ii) ML models relying on static features can be highly sensitive to inlining; iii) subtle compiler settings can be leveraged to deliberately craft evasive binary variants; and iv) inlining ratios vary substantially across applications and build configurations, undermining assumptions of consistency in training and evaluation of ML models.

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

↑