Visible to the public Gap between Theory and Practice: An Empirical Study of Security Patches in Solidity

TitleGap between Theory and Practice: An Empirical Study of Security Patches in Solidity
Publication TypeConference Paper
Year of Publication2020
AuthorsHwang, S., Ryu, S.
Conference Name2020 IEEE/ACM 42nd International Conference on Software Engineering (ICSE)
KeywordsC++ language, compiler security, compositionality, contracts, electronic commerce, empirical study, encoding, Ethereum smart contract developers, Manuals, Metrics, missing security patches, potentially vulnerable contracts, program compilers, program diagnostics, pubcrawl, real-world Ethereum smart contracts, real-world Solidity contracts, Resiliency, Scalability, security, security of data, security patches, security vulnerabilities, smart contract security, smart contracts, software engineering, Solidity, Solidity team, static analysis, telecommunication security, Tools, vulnerability patches
AbstractEthereum, one of the most popular blockchain platforms, provides financial transactions like payments and auctions through smart contracts. Due to the immense interest in smart contracts in academia, the research community of smart contract security has made a significant improvement recently. Researchers have reported various security vulnerabilities in smart contracts, and developed static analysis tools and verification frameworks to detect them. However, it is unclear whether such great efforts from academia has indeed enhanced the security of smart contracts in reality. To understand the security level of smart contracts in the wild, we empirically studied 55,046 real-world Ethereum smart contracts written in Solidity, the most popular programming language used by Ethereum smart contract developers. We first examined how many well-known vulnerabilities the Solidity compiler has patched, and how frequently the Solidity team publishes compiler releases. Unfortunately, we observed that many known vulnerabilities are not yet patched, and some patches are not even sufficient to avoid their target vulnerabilities. Subsequently, we investigated whether smart contract developers use the most recent compiler with vulnerabilities patched. We reported that developers of more than 98% of real-world Solidity contracts still use older compilers without vulnerability patches, and more than 25% of the contracts are potentially vulnerable due to the missing security patches. To understand actual impacts of the missing patches, we manually investigated potentially vulnerable contracts that are detected by our static analyzer and identified common mistakes by Solidity developers, which may cause serious security issues such as financial loss. We detected hundreds of vulnerable contracts and about one fourth of the vulnerable contracts are used by thousands of people. We recommend the Solidity team to make patches that resolve known vulnerabilities correctly, and developers to use the latest Solidity compiler to avoid missing security patches.
Citation Keyhwang_gap_2020