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

将重入保护与智能合约实现逻辑解耦

Decoupling Reentrancy Protection from Smart Contract Implementation Logic

David R. Cheriton School of Computing University of Waterloo(滑铁卢大学大卫·R·切里顿计算机学院)

Shashank Joshi, Wojciech Golab

AI总结:

提出一种基于代理的通用重入攻击防御方案Sentinel,通过将重入逻辑集成到代理层,实现对多种重入攻击类型的100%覆盖,性能优于现有方案40%以上。

摘要:

重入攻击仍然是对去中心化应用(DApps)的持续威胁,恶意行为者去年通过利用EVM的合约间消息传递语义,从DApp生态系统中窃取了约8000万美元。现有研究主要侧重于检测,依赖已知攻击模式,未能提供消除漏洞的可部署解决方案。传统的重入防护同样有限,在攻击变体上覆盖不完整,且缺乏对复杂DApp交互的鲁棒性。在本文中,我们介绍Sentinel,一种新颖的基于代理的方法,通过将重入逻辑直接集成到代理层,拦截对底层实现合约的所有调用,以类型无关的方式缓解重入漏洞。关键特性包括双模式运行系统,提供气体优化的内部防护和高安全性的外部锁注册表,用于跨合约重入预防。该代理还智能处理静态调用,在保护只读重入(ROR)攻击的同时,实现安全的视图函数执行。通过对70个易受攻击的智能合约数据集进行严格评估,Sentinel在四种主要重入攻击类别上实现了100%的安全覆盖,性能优于现有解决方案40%以上。

英文摘要:

Reentrancy attacks remain a persistent threat to decentralized applications (DApps), with malicious actors siphoning around 80M USD from the DApp ecosystem last year by exploiting EVM's inter-contract message-passing semantics. Existing research focuses primarily on detection, relying on known attack patterns, and fails to provide deployable solutions that eliminate the vulnerability. Traditional reentrancy guards are similarly limited, offering incomplete coverage across attack variations and lacking robustness against complex DApp interactions. In this paper, we introduce Sentinel, a novel proxy-based approach that mitigates reentrancy vulnerabilities in a type-agnostic way by integrating reentrancy logic directly into the proxy layer, intercepting all calls to the underlying implementation contract. Key features include a dual-mode operational system offering both a gas-optimized internal guard and a high-security external lock registry for cross-contract reentrancy prevention. The proxy also intelligently handles static calls, enabling safe view-function execution while protecting against Read-Only Reentrancy (ROR) attacks. Through rigorous evaluation on a dataset of 70 vulnerable smart contracts, Sentinel achieves 100% security coverage across four major reentrancy attack categories, outperforming existing solutions by over 40%

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

↑