Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
139 tokens/sec
GPT-4o
47 tokens/sec
Gemini 2.5 Pro Pro
43 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
47 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Bringing Rust to Safety-Critical Systems in Space (2405.18135v1)

Published 28 May 2024 in cs.CR

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.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (51)
  1. AdaCore, “Gnat pro for rust: Release announcement,” https://www.adacore.com/gnatpro-rust, 2023.
  2. ——, “RecordFlux: Development of provable, secure communication protocols,” https://www.adacore.com/press/adacore-launches-recordflux-technology, 2023.
  3. 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.
  4. T. Ballo, M. Ballo, and A. James, “High assurance rust: Developing secure and robust software,” https://highassurance.rs, 2022.
  5. 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.
  6. 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.
  7. 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.
  8. CSP Contributers, “The Cubesat Space Protocol library: C implementation,” https://github.com/libcsp/libcsp, 2011, accessed: 2024-01-18.
  9. ——, “The Cubesat Space Protocol documentation,” https://libcsp.github.io/libcsp/, 2023, accessed: 2024-01-18.
  10. Embedded Rust Working Group, “Cortex-M Rust Crates,” https://github.com/rust-embedded/cortex-m, 2016, accessed: 2024-01-18.
  11. ——, “embedded-hal: A hardware abstraction layer for embedded systems,” https://github.com/rust-embedded/embedded-hal, 2017, accessed: 2024-01-18.
  12. ——, “heapless: static-friendly data structures,” https://github.com/rust-embedded/heapless/, 2017, accessed: 2024-01-18.
  13. ——, “The Embedonomicon: Creating a custom target,” https://docs.rust-embedded.org/embedonomicon/custom-target.html, 2023.
  14. G. Falco, “The vacuum of space cyber security,” in AIAA SPACE and Astronautics Forum and Exposition.   American Institute of Aeronautics and Astronautics, 2018.
  15. Ferrous Systems, “flip-link: embedded zero-cost stack overflow protection,” https://github.com/knurling-rs/flip-link, 2020, accessed: 2024-01-18.
  16. ——, “Ferrocene Language Specification for Rust,” https://github.com/ferrocene/specification, 2023.
  17. ——, “Ferrocene: Open source qualified rust compiler toolchain,” https://ferrous-systems.com/ferrocene/, 2023.
  18. ——, “Rust for Mission Critical Applications,” https://ferrous-systems.com/blog/rust-for-mission-critical-applications/, 2023.
  19. 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.
  20. 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.
  21. 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.
  22. 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.
  23. 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
  24. International Organization for Standardization (ISO), “Road vehicles - functional safety,” ISO, Qualification Standard ISO 26262, 2018. [Online]. Available: https://www.iso.org/standard/68383.html
  25. 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
  26. 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.
  27. 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
  28. 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.
  29. 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.
  30. Mozilla, “cbindgen: generate c headers for rust libraries with public c api,” https://github.com/mozilla/cbindgen, 2019, accessed: 2024-01-18.
  31. 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.
  32. Nelson, Stacey, “Certification processes for safety-critical and mission-critical aerospace software,” NASA, Tech. Rep., 2003. [Online]. Available: https://ntrs.nasa.gov/citations/20030065988
  33. J. M. Perkel, “Why scientists are turning to rust,” Nature, vol. 588, no. 7836, pp. 185–186, 2020.
  34. QUARTIQ, “List of device drivers based on embedded-hal,” https://github.com/rust-embedded/awesome-embedded-rust#driver-crates, 2019, accessed: 2024-01-18.
  35. ——, “The Stabilizer DSP Firmware,” https://github.com/quartiq/stabilizer, 2019, accessed: 2024-01-18.
  36. 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.
  37. RTCA, “Software considerations in airborne systems and equipment certification,” RTCA, Qualification Standard DO-178C, Dec. 2011.
  38. rust-openssl Contributers, “The openssl rust binding,” https://github.com/sfackler/rust-openssl, 2015, accessed: 2024-01-22.
  39. Rust Project, “bindgen: generate rust ffi bindings to c,” https://github.com/rust-lang/rust-bindgen, 2019, accessed: 2024-01-18.
  40. 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.
  41. 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.
  42. L. Seidel, D. Maier, and M. Muench, “Forming faster firmware fuzzers,” in Proceedings of the 32th USENIX Security Symposium (USENIX), 2023.
  43. 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.
  44. Stack Overflow, “Annual developer journey ’23,” https://survey.stackoverflow.co/2023/, 2023, accessed: 2024-01-18.
  45. J. A. Steinberger, “A survey of satellite communications system vulnerabilities,” Ph.D. dissertation, 2008. [Online]. Available: https://scholar.afit.edu/etd/2729
  46. 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.
  47. 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/
  48. United Nations Office for Outer Space Affairs (UNOOSA), “Online index of objects launched into outer space,” https://www.unoosa.org/oosa/osoindex/, 2022.
  49. 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.
  50. 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.
  51. Xplore, Inc., “KubOS: Open-source software stack for satellites,” https://github.com/kubos/kubos, 2023, accessed: 2024-01-18.

Summary

  • The paper presents an incremental C-to-Rust migration approach using a Cubesat Space Protocol case study.
  • The paper identifies and mitigates three key vulnerabilities in traditional C code, highlighting Rust's advanced memory safety.
  • The paper introduces a new Rust compiler target for bare metal PowerPC CPUs, expanding Rust’s applicability in aerospace systems.

Bringing Rust to Safety-Critical Systems in Space

The paper by Lukas Seidel and Julian Beier explores the application of the Rust programming language in safety-critical systems for aerospace applications. This essay provides an expert overview of the paper's contributions, methods, and implications.

Overview of the Problem

Traditional development of safety-critical aerospace systems predominantly utilizes the C programming language. Although C's efficiency and maturity make it a widely adopted choice, its lack of inherent memory safety features often results in security vulnerabilities and system instabilities. As space systems play increasingly vital roles in scientific research, communication, and Earth observation, the need for more robust and secure software has never been more critical.

Rust as an Alternative

Rust, designed with safety and performance as its core principles, offers promising alternatives to C by eliminating common memory safety issues through its unique ownership model and type system. Despite its advantages, the adoption of Rust in safety-critical environments remains limited due to its relatively recent development and lack of industry-standard qualifications.

Contributions of the Paper

The paper makes several significant contributions towards integrating Rust into safety-critical aerospace systems:

  1. Evaluation of Embedded Rust Ecosystem: The authors analyze the current state of the Rust ecosystem for embedded and safety-critical applications. They highlight the maturity of the ecosystem, particularly in the context of embedded systems, such as the diverse hardware support provided by the embedded-hal crate.
  2. Partial Rewriting Approach: A method for incrementally replacing C code with Rust implementations is introduced. This approach allows developers to enhance code safety without the need for a complete system overhaul. The authors demonstrate this methodology through a case paper on the Cubesat Space Protocol (CSP), a widely used open-source satellite communication protocol.
  3. Vulnerability Discovery and Mitigation: Through their security analysis of the CSP, the authors identify and fix three previously undiscovered vulnerabilities. These include buffer overflows and a null pointer dereference, showcasing Rust's potential to improve system reliability.
  4. Introduction of a New Rust Compiler Target: The paper presents a new target configuration for the Rust compiler, enabling the compilation of Rust code for bare metal PowerPC CPUs, a prevalent architecture in aerospace systems. This contribution broadens Rust's applicability in the space domain.

Practical and Theoretical Implications

Theoretical Implications:

  • Memory Safety in Safety-Critical Domains: The integration of Rust's safety features into aerospace systems addresses a critical gap in current practices, emphasizing the theoretical benefits of memory-safe programming languages in safety-critical contexts.
  • Evolving Standards for Safety-Critical Software: The paper's analysis and recommendations contribute to the ongoing discussion about updating and possibly extending safety-critical software standards to accommodate modern languages like Rust.

Practical Implications:

  • Enhanced Robustness and Security: The findings and methodologies presented offer actionable insights into how existing aerospace systems can be incrementally made more secure and reliable by adopting Rust.
  • Industry Adoption and Qualification: The development of qualified toolchains and standard libraries, as discussed by the authors, is crucial for broader industry acceptance. The paper's recommendations could lead to increased adoption of Rust in aerospace applications, potentially setting new benchmarks for software safety and security.

Future Speculations

Looking ahead, the continued adoption of Rust in safety-critical systems could significantly transform software development practices within the aerospace industry. As more components and systems gradually transition to Rust, we might observe a marked decline in the frequency and severity of memory-related vulnerabilities. Moreover, future research could focus on further qualifying Rust toolchains and libraries under various safety-critical standards, including DO-178C for aerospace applications.

Conclusion

This paper provides a comprehensive evaluation of the potential for integrating Rust into safety-critical aerospace systems, underscored by substantive empirical contributions and practical recommendations. The adoption of Rust promises a new era of safer, more secure space systems, and the methodologies and insights offered here could serve as a catalyst for further innovations in this domain. The authors' work sets a robust foundation for further research and development, aligning with the industry's evolving needs for robust and secure software.

HackerNews