-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Docker work without --security-opt label=disable
#25
Comments
Do you have the AVC messages? |
AFAICT there are no messages |
After it fails with Docker, do |
$ docker run --runtime crun-vm -it --rm quay.io/containerdisks/fedora:39 ""
error: Failed to start domain 'domain'
error: internal error: Child process (/usr/bin/passt --one-off --socket /run/libvirt/qemu/passt/1-domain-net0.socket --pid /run/libvirt/qemu/passt/1-domain-net0-passt.pid --tcp-ports all --udp-ports all) unexpected exit status 1: Don't run as root. Changing to nobody...
No routable interface for IPv6: IPv6 is disabled
Template interface: eth0 (IPv4)
MAC:
host: 02:42:ac:11:00:02
DHCP:
assign: 172.17.0.2
mask: 255.255.0.0
router: 172.17.0.1
DNS:
192.168.1.254
192.168.1.254
DNS search list:
Home
UNIX domain socket bound at /run/libvirt/qemu/passt/1-domain-net0.socket
You can now start qemu (>= 7.2, with commit 13c6be96618c):
kvm ... -device virtio-net-pci,netdev=s -netdev stream,id=s,server=off,addr.type=unix,addr.path=/run/libvirt/qemu/passt/1-domain-net0.socket
or qrap, for earlier qemu versions:
./qrap 5 kvm ... -net socket,fd=5 -net nic,model=virtio
umount2: Permission denied
Failed to sandbox process, exiting
$ sudo ausearch -m avc -ts recent
<no matches> |
I am questioning wheter this is an SELinux issue or a seccomp issue. If you do
If this comes back as something other the container_t, then SELinux separation is not enabled. I could understand you having to run docker run --security-opt seccomp=unconfined ... To run QEMU. |
If when using |
It works after $ sudo semodule -DB
$ sudo ausearch -m avc -ts recent
----
time->Sat Mar 2 12:22:48 2024
type=AVC msg=audit(1709382168.712:4989): avc: denied { unmount } for pid=461770 comm="passt.avx2" scontext=system_u:system_r:container_t:s0:c718,c722 tcontext=system_u:object_r:tmpfs_t:s0 tclass=filesystem permissive=0 |
Fixed in containers/container-selinux#301 |
Thanks. Do you know if that will eventually propagate into Fedora 39? |
Yes it should, not sure why the automatic build did not happen. @lsm5 ? https://github.com/containers/container-selinux/releases/tag/v2.230.0 Might be because v2.229.1 is still in updates testing. |
crun-vm currently only works with Docker if
--security-opt label=disable
is given. Without it, a call toumount2()
made by passt fails with EPERM.The text was updated successfully, but these errors were encountered: