No offense guys, but you have some very serious misconception about security. I'll try to explain, but it's on you if you don't understand.
I'm only hoping that you're just ignorant and misguided in security matters and not trying to deliberately mislead people so that gov's backdoors could work on hobby OSes too. That would be a very bad thing, right?
(I understand that there's a pressure from CIA, FBI and NSA to put backdoors into software, but the fact is, those backdoors could be used by Russian and Chinese rootkits too! As it happend many many times already.)
rdos wrote:I don't think it is UEFI you should be worried about in a typical PC, rather SMM and integrated PCIe hardware. These can pose huge security threats if a motherboard manufacturer have malicious intentions, which you actually don't know beforehand.
You're mistaken, and you have even said it yourself why. To exploit SMM and PCIe, you'll need a malicious
manufacturer. That's one well checked actor in the chain, who would have to infect ALL boards, kinda risky with extremely high chance of being caught, not to mention the scandal afterwards which they definitely want to avoid. On the other hand, UEFI can be exploited by
anyone and anytime, you don't have to be the manufacturer of the board for that, you just need write access to the ESP.
kzinti wrote:I meant SMM, and that's a much bigger risk than UEFI.
No, because it's a lot harder to change the SMM code than to place some .efi files on a FAT formatted ESP to inject UEFI run-time code.
kzinti wrote:I am not talking about the quality / security of your ACPI bytecode interepreter. I am talking about the bytecode itself. How do you know it wasn't tampered with before you start using it?
But you should. The bytecode can't do anything that the interpreter doesn't allow, for example the interpreter can do bound checks and memory access verification. Therefore it doesn't matter if someone has tempered with the bytecode if it's interpreted in a sandbox environment.
kzinti wrote:ACPI bytecode can read/write to any address and I/O port.
Wrong. the bytecode can only access what the interpreter allows. And since you're writing the interpreter, you can do as many checks as you want.
kzinti wrote:Running this in kernel space seems even more dangerous than UEFI to me.
That's because you are not a security expert. If you were, then you would know that interpreting a bytecode (specially in user space, I must put emphasis on that part because you seem to keep forgetting that) with a sandboxing interpreter is far less dangerous than running unchecked native code in kernel-space with full supervisor privileges. If you don't understand this, then no offense, but go study the topic a bit more.
kzinti wrote:Worrying about being attacked by UEFI runtime services and not everything else would be pointless.
Who said I don't care about the others? Not worrying about UEFI which is by far the most exploitable part of the firmware is just stupid. Just because there are other attack vectors doesn't mean we should forget about the biggest threat.
Cheers,
bzt