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

一种具有安全控制流的智能合约语言(技术报告)

A Language for Smart Contracts with Secure Control Flow (Technical Report)

Siqiu Yao, Haobin Ni, Stephanie Ma, Noah Schiff, Andrew C. Myers, Ethan Cecchetti

AI总结:

针对智能合约的控制流攻击,提出语言SCIF,通过扩展安全信息流机制强制端到端安全及控制流限制,编译为Solidity,以最小开销保护合约。

摘要:

智能合约经常容易受到基于混淆代理、重入和不正确错误处理的控制流攻击。这些攻击利用了多个可能未知合约之间交互的复杂性。现有的防止漏洞的最佳实践依赖于代码模式和启发式方法,这些方法会产生误报和漏报。即使进行了广泛的审计和使用启发式工具,新的漏洞仍会不断出现,通常造成数千万美元的损失。我们引入了SCIF,一种用于安全智能合约的语言,以解决这些类别的控制流攻击。通过以原则性的方式扩展安全信息流机制,SCIF强制执行经典的端到端信息流安全性和对控制流的新安全限制,即使SCIF合约与恶意的非SCIF代码交互时也是如此。SCIF作为编译到Solidity的编译器实现。我们通过具有复杂安全推理的应用程序案例研究和一个大型不安全代码语料库,展示了SCIF如何以最小的开销保护合约。

英文摘要:

Smart contracts are frequently vulnerable to control-flow attacks based on confused deputies, reentrancy, and incorrect error handling. These attacks exploit the complexity of interactions among multiple possibly unknown contracts. Existing best practices to prevent vulnerabilities rely on code patterns and heuristics that produce both false positives and false negatives. Even with extensive audits and heuristic tools, new vulnerabilities continue to arise, routinely costing tens of millions of dollars. We introduce SCIF, a language for secure smart contracts, that addresses these classes of control-flow attacks. By extending secure information flow mechanisms in a principled way, SCIF enforces both classic end-to-end information flow security and new security restrictions on control flow, even when SCIF contracts interact with malicious non-SCIF code. SCIF is implemented as a compiler to Solidity. We show how SCIF can secure contracts with minimal overhead through case studies of applications with intricate security reasoning and a large corpus of insecure code.

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

↑