Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm not a RISC-V expert, primarily relying on open-source firmware community knowledge and the opinion of such figures as Ron Minnich, but AFAIK, most firmware for production RISC-V deployments is closed-source, so we can't say if vendors use OpenSBI implementation or some modified version for their malicious purposes. If I need to be corrected, please point me to products that state how they transparently use SBI. There is evidence of transparent use of SMM in coreboot. SBI is not the only RISC-V TEE. There are also other concepts, like MultiZone [1] and PMP-based Keystone [2], advertised as trusted execution environments

The openness of specification only matters a little here - UEFI specification about management mode is also open. But IBVs screwed us many times [3] by implementing low-quality SMIs that could elevate privileges, and the spec does not guarantee that implementers follow it. Lack of tooling makes compliance difficult - it slowly changes with various startups seeing that as an opportunity (e.g., Binarly, Eclypsium?).

My point is that SMM as TEE is not a unique x86 feature, and other significant architectures have similar mechanisms. OS has a means of figuring out that it was in SMI, so it is not entirely hidden but still has superpowers. In the CNC world SMI latency is measured from OS [4].

Trusted execution environments are hammers and can be used for a good purpose in a transparent way and for malicious purposes. Further typically depends on the trustworthiness of mechanisms implemented and used by vendors, but thus keep the fact that TEEs and peripheral MCUs are everywhere, which may lead to the extended attack surface.

Why do we see those TEEs, peripheral MCUs, everywhere? I like the explanation in this lecture [5]. No architecture can quickly fix that problem.

[1]: https://hex-five.com/multizone-security-tee-riscv/

[2]: http://docs.keystone-enclave.org/en/latest/Getting-Started/H...

[3]: https://research.nccgroup.com/2023/04/11/stepping-insyde-sys...

[4]: http://wiki.linuxcnc.org/cgi-bin/wiki.pl?FixingSMIIssues

[5]: https://youtu.be/36myc8wQhLo



There's little RISC-V could do to prevent bad SMIs.

It already did well enough by standardizing SBI and by providing a high-quality open implementation of it.

This minimizes (or even removes) incentives to provide a proprietary solution.

Some vendors will of course do whatever they want, instead of just using opensbi.

But they'll be opting out of being compliant with the platform specs, and of benefiting from the support for SBI present in operating systems and embedded toolchains. Such an implementation would just make themselves and everybody else miserable.

In an ideal world, the market will avoid non-compliant SoCs. In practice, there will be some of these to point at as examples of how not to operate.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: