arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.06975cs.CR
收藏

PSR2: 一种基于阶段的语义推理框架,通过合同细化检测原子性违规

PSR2: A Phase-based Semantic Reasoning Framework for Atomicity Violation Detection via Contract Refinement

Hainan University(海南大学)

Xin Wang, Wenkai Li, Zongwei Li, Xiaoqi Li

AI总结:

本文提出PSR2框架,通过结合结构路径搜索与确定性语义推理,有效检测智能合约中的原子性违规问题,实验表明其在复杂ERC-721场景中F1得分达94.69%。

摘要:

随着去中心化应用的快速发展,智能合约安全面临严峻挑战,特别是在Oracle和NFT等复杂逻辑中存在原子性违规问题。传统静态分析器因规则集僵化和缺乏深度上下文意识,导致在识别依赖中间状态不一致的漏洞时存在高误报和误报率。为解决这些问题,本文提出PSR²,一种新颖的协同静态分析框架,整合了结构路径搜索与确定性语义推理。PSR²利用图结构分析模块(GSAM)识别控制流图中的可疑执行序列,并利用语义上下文分析模块(SCAM)从抽象语法树中提取数据依赖性和状态事实。融合决策模块(FDM)则通过形式交叉验证基于统一的原子性不一致模型确认漏洞。在1,600个合约样本上的实验结果表明,PSR²显著优于模式匹配基线,其在复杂ERC-721场景中的F1得分达到94.69%,相比现有工具的51.86%。消融研究进一步证实,我们的融合逻辑相比单一模块分析将误报率减少近一半。

英文摘要:

With the rapid advancement of decentralized applications, smart contract security faces severe challenges, particularly regarding atomicity violations in complex logic such as Oracle and NFT contracts. Rigid rule sets often limit traditional static analyzers and lack deep contextual awareness, leading to high false-positive and false-negative rates when identifying vulnerabilities that depend on intermediate state inconsistencies. To address these limitations, this paper proposes PSR\textsuperscript{2}, a novel collaborative static analysis framework that integrates structural path searching with deterministic semantic reasoning. PSR\textsuperscript{2} utilizes a Graph Structure Analysis Module (GSAM) to identify suspicious execution sequences in control flow graphs and a Semantic Context Analysis Module (SCAM) to extract data dependencies and state facts from abstract syntax trees. A Fusion Decision Module (FDM) then performs formal cross validation to confirm vulnerabilities based on a unified atomicity inconsistency model. Experimental results on 1,600 contract samples demonstrate that PSR\textsuperscript{2} significantly outperforms pattern-matching baselines, achieving an F1-score of 92.36\% in complex ERC-721 scenarios compared to 51.86\% for existing tools. Ablation studies further confirm that our fusion logic effectively reduces the false-positive rate by nearly half compared to single module analysis.

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

↑