Is there any work underway to improve isolation in Kata?
Two directions that come to mind are:
1. Design isolation from scratch for Kata, including unprivileged uid/gid, namespaces, and SELinux. This requires changes to Kata because the QEMU process will not be able to open arbitrary files (e.g. device hotplug, 9p configuration).
FWIW, relying on namespaces doesn't add a lot of security because if the guest is malicious, then that may well be because of a Linux namespaces security hole - the attacker could just use the same exploit again to escape from QEMU to the host.
2. Use libvirt-go (API) or libvirt-go-xml (XML) instead of govmm to get strong isolation. This would also slim down virtcontainers and remove the dependency on govmm (no more command-line munging and defining object models for QEMU command-line concepts).
Stefan
Hi Stefan, I did some research previously into filesystem encryption for the container guest. This was intended as an additional control for SEV containers. (Memory encryption is more valuable if the guest container filesystem isn't mounted unencrypted in the host.) Of the two options that you outline above, option #2 (libvirt integration) seems like the right choice architecturally. (I'll have to update my SEV patches, but libvirt integration will likely make them smaller overall.) This may also address my filesystem concerns as well. Does the SELinux policy used by libvirt also protect the mount directory for the container filesystem? Sincerely, Jesse Larrew MTS Software Security Architect AMD Security Architecture R&D jesse.larrew@amd.com O: +(1) 512-602-0092 (x50092) M: +(1) 512-791-4852