Friend or Foe Inside? Exploring In-Process Isolation to Maintain Memory Safety for Unsafe Rust

06/13/2023
by   Merve Gülmez, et al.
0

Rust is a popular memory-safe systems programming language. In order to interact with hardware or call into non-Rust libraries, Rust provides unsafe language features that shift responsibility for ensuring memory safety to the developer. Failing to do so, may lead to memory safety violations in unsafe code which can violate safety of the entire application. In this work we explore in-process isolation with Memory Protection Keys as a mechanism to shield safe program sections from safety violations that may happen in unsafe sections. Our approach is easy to use and comprehensive as it prevents heap and stack-based violations. We further compare process-based and in-process isolation mechanisms and the necessary requirements for data serialization, communication, and context switching. Our results show that in-process isolation can be effective and efficient, permits for a high degree of automation, and also enables a notion of application rewinding where the safe program section may detect and safely handle violations in unsafe code.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/10/2021

Garmr: Defending the gates of PKU-based sandboxing

Memory Protection Keys for Userspace (PKU) is a recent hardware feature ...
research
05/20/2017

The Meaning of Memory Safety

We propose a rigorous characterization of what it means for a programmin...
research
01/21/2018

ERIM: Secure and Efficient In-process Isolation with Memory Protection Keys

Many applications can benefit from isolating sensitive data in a secure ...
research
02/03/2018

Software Fault Isolation for Robust Compilation

Memory corruption vulnerabilities are endemic to unsafe languages, such ...
research
09/06/2023

Reference Capabilities for Flexible Memory Management: Extended Version

Verona is a concurrent object-oriented programming language that organis...
research
02/03/2023

CheckedCBox: Type Directed Program Partitioning with Checked C for Incremental Spatial Memory Safety

Spatial memory safety violation is still a major issue for C programs. C...
research
04/10/2018

PULP: Inner-process Isolation based on the Program Counter and Data Memory Address

Plenty of in-process vulnerabilities are blamed on various out of bound ...

Please sign up or login with your details

Forgot password? Click here to reset