Comparative Analysis of Safety and Security of C and Rust on Raspberry Pi Systems
This research presents a comparative analysis of the safety and security characteristics of C and Rust on Raspberry Pi systems. Using a Raspberry Pi 3 Model B+ running a 64-bit Linux environment, the study evaluates how both programming languages behave under controlled test cases involving common software vulnerabilities and runtime failures. The experiments examine buffer overflow, use-after-free and dangling pointers, integer overflow, format-string vulnerabilities, stack exhaustion, heap allocation, null pointer handling, and thread panic behavior. The study focuses on the differences between C's manual memory management model and Rust's ownership, borrowing, type-safety, and runtime safety mechanisms. Experimental results demonstrate how several vulnerability classes can compile and reach execution in C, while safe Rust prevents or detects many comparable unsafe operations through compile-time checks, explicit APIs, or runtime panics. The research also discusses the limitations of the experimental environment and the implications of adopting Rust for memory-safe systems programming on ARM-based embedded and edge-computing platforms.
Authors
- Gio Rivera
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-09-17
- DOI
- https://doi.org/10.5281/zenodo.22809693
- Primary Topic
- Security and Verification in Computing
- Type
- article
- Field-Weighted Citation Impact
- 0.00