-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Security vulnerabilities and mitigations #30
base: nemesis
Are you sure you want to change the base?
Conversation
UART tests take a looong time and not related to our attacks.
This should have nothing to do with the Sancus extensions, being a bug in the test case stimulus file. Fix also implemented in the upstream omsp430 repo as per commit 6cc491c.
Introduced a Verilog parameter with the updated maximal instruction execution length, 7 cycles. Keep in mind that this only fixes enclaves that write to program memory, but not enclaves using cryptographic instructions.
The hardware flag that indicates that an enclave has been interrupted is now lowered during the corresponding reti, so later reti instructions do not restore the shadow register file.
The interrupt padding mechanism is now applied to interrupts scheduled by the watchdog timer.
Enclave accesses to unprotected memory regions now cause a memory violation.
The default number of supported enclaves is now restricted to 1.
Jumping to the entry point of the enclave while an enclave interrupt is being handled now results in a violation. NOTE: This mitigation has only been tested on a system that supports a single enclave.
Non-jump instructions following reti first had to go through the E_JMP state before getting into execution. E_JMP is now integrated into the final stage of the reti instruction itself.
Enclaves are now disallowed from (partially) mapping either their data or text sections over the memory-mapped I/O section or the interrupt vector table.
Updates to the GIE bit in the status register are now ignored if the CPU is currently executing the enclave.
NOTE: contextual equivalence only considered breached when attack succeeds in recognizing both SECRET=0 and SECRET=1.
cf. original, upstream openmsp430 BSD 3-clause license.
CI fails because the target branch is not named "mitigations". See suggested fix above. Probably best to create a new branch on margonbognar/sancus-core-gap to hold the PR code with the extra commit for mitigations (else the suggested fix will break the CI at the mitigations branch of margonbognar/sancus-core-gap). If needed we can create the new |
okay attempted another fix committed above, I expect this would fix it |
@martonbognar we kind of lost track of this, I just realized. What is the status on this PR, should we go ahead and merge it? |
This pull request provides patches for some of the vulnerabilities found in our paper "Mind the Gap: Studying the Insecurity of Provably Secure Embedded Trusted Execution Architectures".
If you have any questions or would like us to make any adjustments to the pull request, let us know!