Replies: 6 comments 1 reply
-
Agreed, following the original design first and then doing our own design (our current impl) which might be far from the original one, when it gets actually needed. Apart from that, what I really want to get into and spend time on is a security analysis based on who manages RTT. I think, currently, it seems that we adopt our current design for efficiency and ease of implementation but not for security. My key question is "managing RTT inside RMM" is more secure than "managing RTT in Host"?, if so, why? That is a very much about offensive research question. |
Beta Was this translation helpful? Give feedback.
-
I disagree the idea due to the reasons below:
|
Beta Was this translation helpful? Give feedback.
-
According to
This means that if we do not conform to the correct implementation of CCA, we might fail to provide its original security guarantees summarized as A core design principle of CCA is the split of responsibility between an untrusted hypervisor and RMM, where the untrusted hypervisor allocates memory and RMM provides integrity and confidentiality guarantees. I think that exposing 2nd-level page table construction/manipulation APIs to the Host is for allowing the Host to retain its ability to dynamically allocate memory to or free memory from a Realm VM. Also, this design decision (exposing page table API to the Host) is amenable for machine-checkable verification. For example, a formally verified enclave system called Komodo (SOSP'17) also exposes an interface to construct enclave's page tables by the Host. If they were constructed independent of the Host, it would not be able to be verified. I think that reducing the channels or amount of information could be a good direction, but not the ultimate goal. If RMM does everything without the aid of the Host, it would be able to remove almost all the channels. However, it would bloat RMM itself (e.g., maintaining another big hypervisor in the end). An important thing to consider is how sensitive information can be leaked through the original design. From my point of view, manipulating RTT by the Host using the existing interface is okay. At least, it has proved the property like I will try to contact a person in ARM to inquire why it chose such design. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the inquiry. Although we have very different opinion, I am glad to open up this issue and have this opportunity to discuss with you all. |
Beta Was this translation helpful? Give feedback.
-
@zpzigi754 Is there a way to mark a discussion as done? As we now have the RTT management scheme that conforms to the ARM CCA spec, it would be better to turn this discussion to "done (or something similar state?)" with a short comment like leaving a link to a relevant PR. |
Beta Was this translation helpful? Give feedback.
-
The discussion has ended towards conforming CCA's original spec and the related PR can be viewed in #193. |
Beta Was this translation helpful? Give feedback.
-
According to CCA's spec, RTT (Realm Translation Table == Realm's stage 2 table) should be managed by the Host. The Host determines where RTT is located, how it is modified, etc. Especially, the Host reads the contents and conducts different actions according to the contents (PTE's state).
However, in the current design of islet, RMM manages RTT independently of the Host. RMM randomly chooses the location of RTT in the heap, and fills the contents against the Host's intention which makes it hard for the Host to manage the RTT (table construction time, table location, and table contents are all different).
My suggestion is adopting the CCA's original design (letting the Host manage RTT).
The expected benefits are
reduced development/maintenance cost
: less debugging time would be required from the less divergence
take advantage of the rigorous design of CCA (some of which were formally verified)
not using several heuristics to avoid issues caused from the difference
Furthermore, the existing testing tools (tf-a-tests and ACS) assume CCA's original design. In order for them to work correctly (instead of showing bogus results), I think that we should follow the original design.
Beta Was this translation helpful? Give feedback.
All reactions