Bringing Rust to Safety-Critical Systems in Space (2405.18135v1)
Abstract: The development of safety-critical aerospace systems is traditionally dominated by the C language. Its language characteristics make it trivial to accidentally introduce memory safety issues resulting in undefined behavior or security vulnerabilities. The Rust language aims to drastically reduce the chance of introducing bugs and consequently produces overall more secure and safer code. However, due to its relatively short lifespan, industry adaption in safety-critical environments is still lacking. This work provides a set of recommendations for the development of safety-critical space systems in Rust. Our recommendations are based on insights from our multi-fold contributions towards safer and more secure aerospace systems: We provide a comprehensive overview of ongoing efforts to adapt Rust for safety-critical system programming, highlighting its potential to enhance system robustness. Next, we introduce a procedure for partially rewriting C-based systems in Rust, offering a pragmatic pathway to improving safety without necessitating a full system overhaul. During the execution of our rewriting case study, we identify and fix three previously undiscovered vulnerabilities in a popular open-source satellite communication protocol. Finally, we introduce a new Rust compiler target configuration for bare metal PowerPC. With this, we aim to broaden Rust's applicability in space-oriented projects, as the architecture is commonly encountered in the domain, e.g., in the James Webb Space Telescope.
- AdaCore, “Gnat pro for rust: Release announcement,” https://www.adacore.com/gnatpro-rust, 2023.
- ——, “RecordFlux: Development of provable, secure communication protocols,” https://www.adacore.com/press/adacore-launches-recordflux-technology, 2023.
- R. Ashmore, A. Howe, R. Chilton, and S. Faily, “Programming language evaluation criteria for safety-critical software in the air domain,” in Proceedings of the IEEE International symposium on software reliability engineering workshops (ISSREW), August 2022.
- T. Ballo, M. Ballo, and A. James, “High assurance rust: Developing secure and robust software,” https://highassurance.rs, 2022.
- L. Burchin, “Rad750 experience: The challenge of see hardening a high performance commercial processor,” in Microelectronics Reliability and Qualification Workshop (MRQW 2002). Manhattan Beach, CA: BAE Systems, 2002.
- Z. Chen, S. L. Thomas, and F. D. Garcia, “Metaemu: An architecture agnostic rehosting framework for automotive firmware,” in ACM Conference on Computer and Communications Security (CCS), 2022.
- A. Costin, H. Turtiainen, S. Khandkher, and T. Hämäläinen, “Cybersecurity of COSPAS-SARSAT and EPIRB: threat and attacker models, exploits, future research,” in Workshop on Security of Space and Satellite Systems (SpaceSec). The Internet Society, February 2023.
- CSP Contributers, “The Cubesat Space Protocol library: C implementation,” https://github.com/libcsp/libcsp, 2011, accessed: 2024-01-18.
- ——, “The Cubesat Space Protocol documentation,” https://libcsp.github.io/libcsp/, 2023, accessed: 2024-01-18.
- Embedded Rust Working Group, “Cortex-M Rust Crates,” https://github.com/rust-embedded/cortex-m, 2016, accessed: 2024-01-18.
- ——, “embedded-hal: A hardware abstraction layer for embedded systems,” https://github.com/rust-embedded/embedded-hal, 2017, accessed: 2024-01-18.
- ——, “heapless: static-friendly data structures,” https://github.com/rust-embedded/heapless/, 2017, accessed: 2024-01-18.
- ——, “The Embedonomicon: Creating a custom target,” https://docs.rust-embedded.org/embedonomicon/custom-target.html, 2023.
- G. Falco, “The vacuum of space cyber security,” in AIAA SPACE and Astronautics Forum and Exposition. American Institute of Aeronautics and Astronautics, 2018.
- Ferrous Systems, “flip-link: embedded zero-cost stack overflow protection,” https://github.com/knurling-rs/flip-link, 2020, accessed: 2024-01-18.
- ——, “Ferrocene Language Specification for Rust,” https://github.com/ferrocene/specification, 2023.
- ——, “Ferrocene: Open source qualified rust compiler toolchain,” https://ferrous-systems.com/ferrocene/, 2023.
- ——, “Rust for Mission Critical Applications,” https://ferrous-systems.com/blog/rust-for-mission-critical-applications/, 2023.
- A. Fioraldi, D. Maier, D. Zhang, and D. Balzarotti, “LibAFL: A Framework to Build Modular and Reusable Fuzzers,” in Proceedings of the 29th ACM conference on Computer and communications security (CCS), ser. ACM Conference on Computer and Communications Security (CCS). ACM, November 2022.
- German Aerospace Center (DLR), “ESA activity: Crustacea in space - co-operative rust and c embedded applications in space - theory and practice,” https://activities.esa.int/4000140242, 2023, accessed: 2024-01-18.
- C. E. Gonzalez, C. J. Rojas, A. Bergel, and M. A. Diaz, “An architecture-tracking approach to evaluate a modular and extensible flight software for cubesat nanosatellites,” IEEE Access, vol. 7, pp. 126 409–126 429, 2019.
- L. Grillmayer and S. Arnold, “Integrating the cubesat space protocol into gsoc’s multi-mission environment,” in Proceedings of the AIAA/USU Conference on Small Satellites, August 2020.
- International Electrotechnical Commission (IEC), “Functional safety of electrical/electronic/programmable electronic safety-related systems,” IEC, Qualification Standard IEC 61508, 2010. [Online]. Available: https://webstore.iec.ch/publication/5515
- International Organization for Standardization (ISO), “Road vehicles - functional safety,” ISO, Qualification Standard ISO 26262, 2018. [Online]. Available: https://www.iso.org/standard/68383.html
- B. Jacobs, “A comparative study of EU and US regulatory approaches to cybersecurity in space,” Air and Space Law, vol. 48, no. 4, pp. 477–492, 2023. [Online]. Available: https://kluwerlawonline.com/journalarticle/Air+and+Space+Law/48.4/AILA2023052
- C. Johnson, “CyberSafety: Cybersecurity and safety-critical software engineering,” in Achieving Systems Safety, C. Dale and T. Anderson, Eds. London: Springer London, 2012, pp. 85–95.
- R. Jung, J.-H. Jourdan, R. Krebbers, and D. Dreyer, “Safe systems programming in rust,” Commun. ACM, vol. 64, no. 4, p. 144–152, March 2021. [Online]. Available: https://doi.org/10.1145/3418295
- S. Klabnik and C. Nichols, “The Rust Programming Language: Unsafe rust,” https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html, accessed: 2024-01-18.
- P. A. Laplante and J. F. DeFranco, “Software engineering of safety-critical systems: Themes from practitioners,” IEEE Transactions on Reliability, vol. 66, no. 3, pp. 825–836, 2017.
- Mozilla, “cbindgen: generate c headers for rust libraries with public c api,” https://github.com/mozilla/cbindgen, 2019, accessed: 2024-01-18.
- N7 Space, “ESA activity: Evaluation of rust usage in space applications by developing bsp and rtos targeting samv71,” https://activities.esa.int/4000140241, 2023, accessed: 2024-01-18.
- Nelson, Stacey, “Certification processes for safety-critical and mission-critical aerospace software,” NASA, Tech. Rep., 2003. [Online]. Available: https://ntrs.nasa.gov/citations/20030065988
- J. M. Perkel, “Why scientists are turning to rust,” Nature, vol. 588, no. 7836, pp. 185–186, 2020.
- QUARTIQ, “List of device drivers based on embedded-hal,” https://github.com/rust-embedded/awesome-embedded-rust#driver-crates, 2019, accessed: 2024-01-18.
- ——, “The Stabilizer DSP Firmware,” https://github.com/quartiq/stabilizer, 2019, accessed: 2024-01-18.
- B. Rajulu, S. Dasiga, and N. R. Iyer, “Open source rtos implementation for on-board computer (obc) in studsat-2,” in IEEE Aerospace Conference, 2014, pp. 1–13.
- RTCA, “Software considerations in airborne systems and equipment certification,” RTCA, Qualification Standard DO-178C, Dec. 2011.
- rust-openssl Contributers, “The openssl rust binding,” https://github.com/sfackler/rust-openssl, 2015, accessed: 2024-01-22.
- Rust Project, “bindgen: generate rust ffi bindings to c,” https://github.com/rust-lang/rust-bindgen, 2019, accessed: 2024-01-18.
- T. Scharnowski, F. Buchmann, S. Wörner, and T. Holz, “A case study on fuzzing satellite firmware,” in 1st Workshop on Security of Space and Satellite Systems, SpaceSec 2023, San Diego, California, USA, Feburary, 27, 2023. The Internet Society, 2023.
- S. Schumilo, C. Aschermann, A. Abbasi, S. Wör-ner, and T. Holz, “Nyx: Greybox hypervisor fuzzing using fast snapshots and affine types,” in Proceedings of the 30th USENIX Security Symposium (USENIX), August 2021, pp. 2597–2614.
- L. Seidel, D. Maier, and M. Muench, “Forming faster firmware fuzzers,” in Proceedings of the 32th USENIX Security Symposium (USENIX), 2023.
- Space and Planetary Exploration Laboratory at University of Chile and University of Santiago of Chile, “SUCHAI nanosatellite flight software,” https://github.com/spel-uchile/SUCHAI-Flight-Software/tree/master, 2023, accessed: 2024-01-18.
- Stack Overflow, “Annual developer journey ’23,” https://survey.stackoverflow.co/2023/, 2023, accessed: 2024-01-18.
- J. A. Steinberger, “A survey of satellite communications system vulnerabilities,” Ph.D. dissertation, 2008. [Online]. Available: https://scholar.afit.edu/etd/2729
- J. V. Stoep, “Google Security: Memory Safe Languages in Android 13,” https://security.googleblog.com/2022/12/memory-safe-languages-in-android-13.html, accessed: 2010-09-30.
- Teledyne e2v Semiconductor, “P2020 Space: Radiation tolerant dual power architecture e500 core,” Product Specification P2020, 2019. [Online]. Available: https://semiconductors.teledyneimaging.com/en/products/processors-and-processing-modules/p2020-space/
- United Nations Office for Outer Space Affairs (UNOOSA), “Online index of objects launched into outer space,” https://www.unoosa.org/oosa/osoindex/, 2022.
- J. Willbold, M. Schloegel, M. Vögele, M. Gerhardt, T. Holz, and A. Abbasi, “Space odyssey: An experimental software security analysis of satellites,” in IEEE Symposium on Security and Privacy (S&P), May 2023.
- C. S. Xia, M. Paltenghi, J. Le Tian, M. Pradel, and L. Zhang, “Fuzz4All: Universal Fuzzing with Large Language Models,” in Proceedings of the International Conference on Software Engineering (ICSE), 2024.
- Xplore, Inc., “KubOS: Open-source software stack for satellites,” https://github.com/kubos/kubos, 2023, accessed: 2024-01-18.