🤖 AI Summary
Existing approaches struggle to effectively detect deep panics and concurrency-safety vulnerabilities in Go programs, primarily due to the language’s intricate runtime mechanisms and concurrency model. To address this, we propose Zorya—a novel concolic analysis framework for Go, the first to leverage Ghidra’s P-Code intermediate representation. Zorya tightly integrates symbolic and concrete execution, supports generic program analysis and user-defined invariant verification, and is extensible to other languages (e.g., C). By incorporating the TinyGo compiler, formally modeling Go’s runtime semantics, and explicitly representing goroutine scheduling, Zorya significantly mitigates path explosion. Evaluation on TinyGo uncovered multiple previously unreported deep panic vulnerabilities, empirically validating Zorya’s precise modeling of Go’s concurrency primitives and runtime behavior. This work establishes a new paradigm for security verification of systems-level Go programs.
📝 Abstract
The widespread adoption of the Go programming language in infrastructure backends and blockchain projects has heightened the need for improved security measures. Established techniques such as unit testing, static analysis, and program fuzzing provide foundational protection mechanisms. Although symbolic execution tools have made significant contributions, opportunities remain to address the complexities of Go's runtime and concurrency model. In this work, we present Zorya, a novel methodology leveraging concrete and symbolic (concolic) execution to evaluate Go programs comprehensively. By systematically exploring execution paths to uncover vulnerabilities beyond conventional testing, symbolic execution offers distinct advantages, and coupling it with concrete execution mitigates the path explosion problem. Our solution employs Ghidra's P-Code as an intermediate representation (IR). This implementation detects runtime panics in the TinyGo compiler and supports both generic and custom invariants. Furthermore, P-Code's generic IR nature enables analysis of programs written in other languages such as C. Future enhancements may include intelligent classification of concolic execution logs to identify vulnerability patterns.