Reference 1
Rust: memory safety is lost when any unsafe blocks are used.
Fedelius Charm(FC): limiting access to the program’s memory while executing unsafe libraries:
fc_immutable
in which call system call mprotect
to change page permission bits and switch to isolated mode;fc_normal
to restore page permissions;mprotect
calls to change page permissions;mprotect
;Related work:
Shredsc7, lwCc14, SpaceJMPc12, provide thread-like abstractions for isolating memory. ==> requires some static analysis or special abstractions;
Codejailc29, provides a sandbox for unsafe libraries.
FC: reverse the sandbox model: isolating the a subset of the trusted region and providing the rest of the memory to the unsafe libraries.
Rust’s benchmarking interface, plain openssl
request & FC-ified openssl
request.
Time to lanuch an openssl
-based HTTP server and processing single client.
vmware Workstation VM, Ubuntu 15, four cores, 2 GB memory.
unsafe operations in TLS-based HTTP servers: use unsafe operations for invoking openssl operations, or make calls to Rust’s ring library, which in turn makes unsafe calls to cryptographic functions.
HTTP server. Four compartments.
128 simultaneous request threads; 5% decrease of number of requests processed in 60 seconds; 13.69% decrease if 50 calls to ring
16 simultaneous requests in 10 milliseconds, the average decrease is 8.30%.
If you could revise
the fundmental principles of
computer system design
to improve security...
... what would you change?