Core Concepts
Leveraging RBAC practices and context-aware repair to fix AC vulnerabilities effectively in smart contracts.
Abstract
Smart contracts are vulnerable to security issues, especially access control vulnerabilities.
Existing repair tools struggle with automatically fixing AC vulnerabilities.
ACFIX utilizes RBAC practices and context information to guide repairs effectively.
ACFIX successfully repaired 94.92% of AC vulnerabilities, outperforming other tools.
The approach involves offline mining of common RBAC practices and online guidance for LLMs.
ACG is constructed to provide code context for identifying role-permission pairs accurately.
Validator ensures the correctness of generated patches through multi-agent debate mechanism.
Evaluation shows the effectiveness of ACFIX in repairing a wide range of AC vulnerabilities.
Stats
Smart contracts are susceptible to various security issues, among which access control (AC) vulnerabilities are particularly critical. While existing research has proposed multiple detection tools, the automatic and appropriate repair of AC vulnerabilities in smart contracts remains a challenge. Unlike commonly supported vulnerability types by existing repair tools, such as reentrancy, which are usually fixed by template-based approaches, the main obstacle of AC lies in identifying the appropriate roles or permissions amid a long list of non-AC-related source code to generate proper patch code, a task that demands human-level intelligence.
To evaluate ACFIX, we built the first benchmark dataset of 118 real-world AC vulnerabilities, and our evaluation revealed that ACFIX successfully repaired 94.92% of them.
Smart contracts, Turing-complete programs executed on blockchain ledgers, implement predefined programmatic logic through transaction-based invocation. With the emergence of decentralized applications such as DeFi and NFTs, the use of smart contracts has significantly expanded within the blockchain ecosystem.
In light of the severe implications of AC vulnerabilities, several automatic detection tools have been recently proposed, including Ethainter, SPCon, AChecker, and SOMO. Except for SPCon, which analyzes past transactions to infer access control policies, most tools perform taint analysis on critical instructions (e.g., selfdestruct) or state variables (e.g., owner) to check whether they can be accessed by unauthorized parties.
While detecting AC vulnerabilities has certain information flow patterns...
Leveraging recent advancements in large language models (LLMs), we employ the state-of-the-art GPT-4 model and enhance it with a novel approach called ACFIX...
To evaluate ACFIX...
In general...
For task (i), determining AC-related operations from the raw code corpus is even hard for GPT-4...
For task (ii), off-the-shelf LLMs were not inherently trained to recognize RBAC roles and their typical privileged operations...
For task (iii), the patches generated might conflict with pre-existing...
Another issue for task (iii) is that LLMs' randomness could still occasionally divert...
Based on the observations above...
Quotes
"Smart contracts are susceptible to various security issues..."
"Unlike commonly supported vulnerability types by existing repair tools..."
"To evaluate ACFIX..."
"In light of the severe implications..."
"Leveraging recent advancements..."