void4 / notes

Notes, Questions, Ideas
22 stars 1 forks source link

Complete runtime state serialization of secure systems #56

Open void4 opened 4 years ago

void4 commented 4 years ago

The problem: Implementation complexity of total reflection/serialization increases with secure base layer abstraction complexity

Languages like C make it relatively easy to serialize the entire runtime state, since all memory is accessible. This same property makes C an insecure language, there is no internal encapsulation whatsoever.

There are two types of languages which use encapsulation: those who use it merely as the main syntactic model (C++, Smalltalk, Java, Python) and those who actually enforce it by managing memory access during runtime (E, Erlang).

In the former, it is still possible to access the entire runtime state easily from any component within the system, because the encapsulation exists only at the language, not the runtime layer, it is not absolute and can be circumvented with special methods.

In the latter, encapsulation is enforced, and the only way to get around it is by accessing lower level functionality of the system (via special VM capabilities, through OS- or lower level insecurity).

The more rights the base layer reifies, the more secure is anything that is built on top of it. But if these abstractions not only encompass memory access, but scheduling, resource metering etc. as well, the state, datastructures that are usually accessible by the VM only must be somehow accessible as well from within/top if total serialization is desired.

Things get even more complicated if the system in question is not single-threaded.

I therefore ask: How could minimal memory- and time-safe architectures that allow total reflection look like?

Serialization can occur on:

zarutian commented 4 years ago

This paper might illuminate some ways this could be done.

Serializing a system without using orthagonal persistance like KeyKOS and ilk is fraught with ackward choices but can be done.