paperbot · PL 论文追踪

全部论文 待读 收藏

P2 eTainter: detecting gas-related vulnerabilities in smart contracts

eTainter:检测智能合约中的 gas 相关漏洞
ISSTA Proceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis2022匹配度 3/10 · 论文属于静态程序分析与污点分析工具,但应用领域是智能合约 gas 漏洞检测,与画像核心关注的 ML/Agentic 程序、LLM 改进静态分析、浮点程序分析或贝叶斯程序分析均无直接交集;仅在静态分析方法和工业级工具落地层面有一般性参考。引用 61 inbox
Asem Ghaleb, Julia Rubin, Karthik Pattabiraman
crossref: 2026-09-12

AI 速览

一句话:提出基于字节码污点分析的静态分析器 eTainter,检测智能合约 gas 相关漏洞。

智能合约在以太坊上执行需消耗用户支付的 gas;若 gas 不足,执行会中止并回滚。但合约中可能包含抬高执行成本的代码模式,攻击者可借此对受害者合约发起拒绝服务等攻击,论文称之为 gas 相关漏洞。为此,作者提出 eTainter,一种在智能合约字节码上进行污点跟踪的静态分析器,用以检测此类漏洞。在带标注合约数据集上,eTainter 的精确率和召回率均优于先前工作 MadMax,人工检查显示其精确率达 90%。作者还对以太坊上 60,612 个真实合约进行大规模分析,发现 2,763 个合约存在 gas 相关漏洞,平均分析一个合约约需 8 秒。

问题
智能合约可能因 gas 相关代码模式导致执行成本升高,并被攻击者利用实施 DoS 等攻击;需要自动检测此类漏洞。
方法
eTainter 对智能合约字节码进行污点跟踪,通过静态分析识别 gas 相关漏洞。
评估
在带标注合约数据集上与 MadMax 比较精确率和召回率,并进行人工检查;同时对 60,612 个真实以太坊合约开展大规模分析,报告漏洞数量与平均分析时间。
原文摘要(Abstract)

The execution of smart contracts on the Ethereum blockchain consumes gas paid for by users submitting contracts' invocation requests. A contract execution proceeds as long as the users dedicate enough gas, within the limit set by Ethereum. If insufficient gas is provided, the contract execution halts and changes made during execution get reverted. Unfortunately, contracts may contain code patterns that increase execution cost, causing the contracts to run out of gas. These patterns can be manipulated by malicious attackers to induce unwanted behavior in the targeted victim contracts, e.g., Denial-of-Service (DoS) attacks. We call these gas-related vulnerabilities. We propose eTainter, a static analyzer for detecting gas-related vulnerabilities based on taint tracking in the bytecode of smart contracts. We evaluate eTainter by comparing it with the prior work, MadMax, on a dataset of annotated contracts. The results show that eTainter outperforms MadMax in both precision and recall, and that eTainter has a precision of 90% based on manual inspection. We also use eTainter to perform large-scale analysis of 60,612 real-world contracts on the Ethereum blockchain. We find that gas-related vulnerabilities exist in 2,763 of these contracts, and that eTainter analyzes a contract in eight seconds, on average.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot7379,
  title = {eTainter: detecting gas-related vulnerabilities in smart contracts},
  author = {Asem Ghaleb and Julia Rubin and Karthik Pattabiraman},
  booktitle = {ISSTA},
  year = {2022},
  doi = {10.1145/3533767.3534378}
}