Pitfalls in VM Implementation on CHERI: Lessons from Porting CRuby
Hanhaotian Liu (University of Tokyo, Japan), Tetsuro Yamazaki (University of Tokyo, Japan), Tomoharu Ugawa (University of Tokyo, Japan)

TL;DR
This paper examines the unique challenges and pitfalls encountered when porting virtual machines, specifically CRuby, to the CHERI hardware architecture, highlighting issues caused by C language behaviors and proposing workarounds.
Contribution
It provides a detailed categorization of VM-specific pitfalls on CHERI, based on a case study of porting CRuby, and discusses practical workarounds and their impacts.
Findings
Most pitfalls stem from undefined behaviors in C on CHERI.
Workarounds can mitigate issues but may affect performance or safety.
Surveyed prior porting efforts to validate the proposed solutions.
Abstract
CHERI (Capability Hardware Enhanced RISC Instructions) is a novel hardware designed to address memory safety issues. By replacing traditional pointers with hardware capabilities, it enhances security in modern software systems. A Virtual Machine (VM) is one such system that can benefit from CHERI's protection, as it may contain latent memory vulnerabilities. However, developing and porting VMs to CHERI is a non-trivial task. There are many subtle pitfalls from the assumptions on the undefined behaviors of the C language made based on conventional architectures. Those assumptions conflict with CHERI's stricter memory safety model, causing unexpected failures. Although several prior works have discussed the process of porting VMs, they focus on the overall porting process instead of the pitfalls for VM implementation on CHERI. The guide for programming in CHERI exists, but it is for…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSecurity and Verification in Computing · Radiation Effects in Electronics · Logic, programming, and type systems
