3 ms·
How does this compare to other methods of isolation / running untrusted code? What are the pros and cons?
by meruru 7y ago
How does this compare to other methods of isolation / running untrusted code? What are the pros and cons?
- nisa 7y agoI've used for developing on a community mesh network - you can boot OpenWrt with a fake wifi driver module and you can plug in in networking as you will and run multiple processes. It's far simpler to configure and does not need compatibily fixes for running in containers.
- stevekemp 7y agoI worked for a hosting company for 10ish years, and they started out their hosting by providing people with UML-based virtual machines for £10/month. In terms of isolation it is "pretty good". The guest has their own kernel, and you can run it as an ordinary user. Add a chroot jail and you can have 50-150 different UML instances running on a single host, each under their own UID. They can't talk to each other, and if they do manage to exploit the kernel they're only gonna get the access to the host which you restrict with chroot, and standard things. It's less of a risk to run isolated things than this than have lots of containers share the same kernel. An escape there means container-A can view/poke container-B AND the host. Of course there is overhead, and most people moved on from UML to Xen/KVM when they became available - both have better performance thanks to virtio, and both have more flexibility for networking, block devices & etc.
- dspillett 7y agohttps://www.linode.com/ https://www.linode.com/ used to run off UML, though they switched quite a number of years ago. It might be worth hunting out their documentation and/or forum archives from around the time of the transition. I recall a lot of detailed discussion (useful discussion too: not just people bashing the technology they don't prefer). I used to run it myself, way back when. For isolation, it is going to be better than a container or jail, but not as good as a full VM, though I was using it for testing personal stuff so wasn't really concerned with isolation from a security point of view. One key con is that it can perform pretty badly in some respects, particularly for loads that ned to talk to the kernel much at all, including processes that perform much IO. It "felt" less cumbersome than full VMs (IIRC I was playing with a mix of VirtualBox and VMWare' Player & Server for that sort of thing at the time), in terms of my automation and to some extent in terms of host resource use (though I didn't test that with any scientific rigour, and if I did any good tests back then the results would not be relevant today anyway as they were pre VT-x and other CPU support which UML can't use but a modern hypervisor can and will).
- jwilk 7y agoI couldn't find any documentation about the intended security model of UML, but from what I could tell, it's not resistant against malicious code running as root in the guest.