面向函数内联场景的二进制到源代码函数相似性检测方法
作者:
通讯作者:

范铭,E-mail:mingfan@mail.xjtu.edu.cn

中图分类号:

TP311

基金项目:

国家自然科学基金(62232014, 62272377, 62372368, 62372367); 陕西省科学技术协会青年人才托举计划


Binary2Source Function Similarity Detection Method Under Function Inlining
Author:
  • 摘要
  • | |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • | |
  • 文章评论
    摘要:

    二进制到源代码函数相似性检测是软件组成成分分析的基础性工作之一. 现有方法主要采用一对一的匹配策略, 即使用单一的二进制函数和单一的源代码函数进行比对. 然而, 由于函数内联的存在, 函数之间的映射关系实际上表现为一对多——单一的二进制函数能够关联至多个源代码函数. 这一差异导致现有方法在函数内联场景下遭受了30%的性能损失. 针对函数内联场景下的二进制到源代码函数匹配需求, 提出了一种面向一对多匹配的二进制到源代码函数相似性检测方法, 旨在生成源代码函数集合作为内联二进制函数的匹配对象, 以弥补源代码函数库的缺失. 通过一系列实验评估了方法的有效性. 实验数据表明, 方法不仅能够提升现有二进制到源代码函数相似性检测的能力, 而且还能够找到内联的源代码函数, 帮助现有工具更好地应对内联挑战.

    Abstract:

    Binary2Source function similarity detection is regarded as one of the fundamental tasks in software composition analysis. In the existing binary2Source matching works, the 1-to-1 matching mechanism is mainly adopted, where one binary function is matched against one source function. However, it is found that such a mapping may be 1-to-n (one binary function is mapped to multiple source functions) due to the existence of function inlining. A 30% performance loss is suffered by the existing binary2Source matching methods under function inlining due to this difference. Aimed at the matching requirement of binary to source functions in the scene of function inlining, a binary2Source function similarity detection method for 1-to-n matching is proposed in this study, which is designed to generate source function sets as the matching objects for the inlined binary functions to make up for the lack of the source function library. The effectiveness of the proposed method is evaluated through a series of experiments. The experimental data indicate that the method can not only improve the existing binary2Source function similarity detection ability but also identify the inlined source code functions, helping the existing tools better cope with the challenges of inlining.

    参考文献
    相似文献
    引证文献
引用本文

贾昂,范铭,徐茜,晋武侠,王海军,刘烃.面向函数内联场景的二进制到源代码函数相似性检测方法.软件学报,2025,36(7):1-19

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2024-08-22
  • 最后修改日期:2024-10-15
  • 在线发布日期: 2024-12-10
文章二维码
您是第19862253位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号