mjg59,
@mjg59@nondeterministic.computer avatar

My annual plea for a thing: I want a type 1 hypervisor that just has a small isolated VM and then passes through the rest of the hardware to the main VM which runs Linux. The small VM is intended to be used to run small pieces of code that the main OS should not be able to interfere with. Does such a thing exist? (Think Xen, but with a Dom0 that can't see into DomUs)

rzeta0,
@rzeta0@mastodon.social avatar

@mjg59

surely this is impossible

i mean, you can wrote a dom0 that doesn't make it easy to see what is an dom0 but it is cryptographically possible

to achieve what you want would require the cryptographic isolation to not stop at the shared hardware

so perhaps you need a separate computer?

(i'm no expert, just thinking aloud - would welcome challenge to my notions about how security works)

mjg59,
@mjg59@nondeterministic.computer avatar

@rzeta0 A hypervisor doesn't have to let a privileged VM see into other VMs - Xen allowing that for Dom0 is an artifact of their design rather than anything inherent. The primary Windows VM can't see into the Credential Guard VM, since the hypervisor has drawn a hardware-enforced barrier in between them.

rzeta0,
@rzeta0@mastodon.social avatar

@mjg59

if you have the patience to argue with me I would value your reply..

for me, a security barrier is cryptographic

software and software-controlled-hardware barriers are just inconveniences

so the hypervisor you mention happens not to make it easy to see into a vm, but with the right combination of software failures or subversion it is possible

the openssl and CPU vulnerabilities (heartbleed, spectre) are illustrative examples

am i being too pendantic about a security boundary?

mjg59,
@mjg59@nondeterministic.computer avatar

@rzeta0 Cryptography doesn't remove side channels - if you keep the secrets in a TPM but it doesn't use constant time operations, or if I'm able to monitor the power rails, that's not an absolute barrier. Very little is absolute - the level of security appropriate for a given problem will vary depending on what your threat model is, and I'm broadly ok with having my WebAuthn secrets in a separate VM running on the same CPU

jornfranke,
@jornfranke@mastodon.online avatar
mjg59,
@mjg59@nondeterministic.computer avatar

@jornfranke No, firecracker VMs are visible to the Linux host

gsuberland,
@gsuberland@chaos.social avatar

@mjg59 a concept like SGX enclaves / LSASS isolation but actually accessible and convenient to use would be very nice.

bluca,
@bluca@fosstodon.org avatar

@mjg59 there's work in progress by @l0kod but don't think it's merged yet: https://lore.kernel.org/all/20240503131910.307630-1-mic@digikod.net/

mjg59,
@mjg59@nondeterministic.computer avatar

@bluca @l0kod Not quite the same - you still have Linux with the ability to see everything, I think?

agraf,
@agraf@fosstodon.org avatar

@mjg59 sounds pretty close to Jailhouse?

mjg59,
@mjg59@nondeterministic.computer avatar

@agraf My recollection is that Jailhouse does static partitioning and no scheduling, ie you need to give it a CPU? It also starts from Linux which makes it harder to sequester secrets that Linux can't get at.

agraf,
@agraf@fosstodon.org avatar

@mjg59 I'm not sure how much both of these are embedded into its architecture or just artifacts of how its main users consume it.

mjg59,
@mjg59@nondeterministic.computer avatar

@agraf I'm pretty sure the lack of scheduling is a design choice that would need to be retrofitted. Launching from Linux is more about how it's managed, so that's probably an easier thing to fix.

hyc,
@hyc@mastodon.social avatar

@mjg59 sounds like something you'd need Secure Encrypted Virtualization for https://www.amd.com/en/developer/sev.html

mjg59,
@mjg59@nondeterministic.computer avatar

@hyc No, once you're in SEV-land you're not really in a good place to do hardware passthrough

hyc,
@hyc@mastodon.social avatar

@mjg59 hm, that's a tough one then, maintaining isolation.

mjg59,
@mjg59@nondeterministic.computer avatar

@hyc I'm fine with the hypervisor being able to see what's happening in arbitrary guests, but there needs to be isolation between the primary VM and the security VM (Hyper-V manages this fine in Windows land)

fl0_id,
@fl0_id@mastodon.social avatar

@mjg59 @hyc does one know how it manages this? Does it just pretend?

mjg59,
@mjg59@nondeterministic.computer avatar

@fl0_id @hyc it's a hypervisor, it simply imposes a barrier between the resources? This isn't a conceptually complicated situation, modern CPUs support it just fine

fl0_id,
@fl0_id@mastodon.social avatar

@mjg59 @hyc sure, but I just meant if the hv can technically see into all guests, who enforces the rules for security vm? The cpu or the hv or both? If the hv, this is likely more easily overridden.

mjg59,
@mjg59@nondeterministic.computer avatar

@fl0_id @hyc overridden by whom?

baloo,
@baloo@sfba.social avatar

@mjg59 @hyc
Curious: what kind of hardware should the security VM need to access?
(I can only guess TPM? For state bootstrap or something?)

mjg59,
@mjg59@nondeterministic.computer avatar

@baloo @hyc Potentially the TPM, but otherwise nothing - just CPU, RAM, and some sort of simple intra-VM communication channel.

baloo,
@baloo@sfba.social avatar

@mjg59 @hyc
I know you already dismissed SEV, but https://github.com/project-oak/oak seems vaguely related?

This is a VM inside the main OS, but the binary inside the TEE is available over grpc.

mjg59,
@mjg59@nondeterministic.computer avatar

@baloo @hyc Right, you can do it the other way around with SEV, but that then leaves you with very restricted hardware support at the moment

noodles,
@noodles@social.earth.li avatar

@mjg59 @hyc Why can you not use SEV-SNP for the security VM, with the main OS running directly on the bare metal?

mjg59,
@mjg59@nondeterministic.computer avatar

@noodles @hyc SEV is pretty much exclusive to server parts, and I have a laptop

noodles,
@noodles@social.earth.li avatar

@mjg59 @hyc Ah, you want to carve the TPM away from the main OS?

mjg59,
@mjg59@nondeterministic.computer avatar

@noodles @hyc Some form of secret manager, at least

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • magazineikmin
  • ethstaker
  • khanakhh
  • rosin
  • Youngstown
  • everett
  • slotface
  • ngwrru68w68
  • mdbf
  • GTA5RPClips
  • kavyap
  • thenastyranch
  • cisconetworking
  • JUstTest
  • cubers
  • Leos
  • InstantRegret
  • Durango
  • tacticalgear
  • tester
  • osvaldo12
  • normalnudes
  • anitta
  • modclub
  • megavids
  • provamag3
  • lostlight
  • All magazines