A proposed API for full-memory encryption
lwn.net
lwn.net
While using multiple keys has legitimate advantages for the user, it's also a step towards unbreakable DRM and other malware. It's easy to think about how a new technology is useful, but it is prudent to also consider how the technology might be used as a weapon.
Memory encryption has obvious niche uses, but seems slightly outside the common threat model for most people (users). The more likely use-case (for the average user) is probably user-hostile: DRM, "Denuvo"-style tamper resistance.
edit: Forgot to mention: the single-key variation (TME) can provide a lot of the user-focused benefits, without the DRM proliferation risk.
No it’s not. With MKTME, the kernel can read all memory, ptrace still works, etc. I don’t even see how a future MKTME v2 would be useful for DRM.
That's great, iff you have root-level access.
> I don’t even see how a future MKTME v2 would be useful for DRM.
Intel already tried that with SGX. (Intel's documentation for SGX was all about creating a "Trusted Computing" environment, using the old Palladium/NGSCB DRM-sense of "trusted".
And if you don’t have root access, then you can’t read other users’ memory. The MMU must be an evil scheme for DRM!
It does however help to mitigate a number of attacks such as freezing memory to extract encryption keys and similar.
I would not advocate memory encryption as a defense against this kind of attack. It's added complexity to fix a different problem (untrustworthy virtualization). OTOH it is useful to protect against physical access at the hardware level - and that's not really a common concern but is valid is some cases.
How do you fix the "untrustworthy virtualization" problem then?
(There's a reason why Spectre and Meltdown were a horror show for virtualization.)
Does the spec say that the encryption be authenticated? If so, where are the MACs stored?
[1] This is a bad kind of security that's very difficult to reason about because it is unsound. This is a matter of "less worse, relatively speaking". The obviously superior and secure approach is to use AEAD, but that would be more difficult to integrate into the system.
I do wonder, though, whether the memory remains protected against adversaries who can put rogue devices on the PCIe or UPI buses; it seems that these would be able to get decrypted data.
is that an issue when you have IOMMU?
I think this paper presents an interesting overview of how to mitigate a subset of hw-related attack vectors. Seems really relevant.
When I read the title I hoped it would protect against that too, but no such luck then, I guess?
This hardware cheat makes it even harder to detect since it reads and writes directly to main memory using DMA. No drivers or software needed at all. All you possibly could detect is the PCI-ID(which can be changed) and possibly the DMA if there's an IOMMU.
Could you please translate this into non-expert language? Does it mean DMA granted devices can break IOMMU separation?
Past Intel architecture allows two threads to share a physical core in such a way as the cached data of the first thread may be probed with a timing attack to reveal confidential data.