-
Notifications
You must be signed in to change notification settings - Fork 324
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
Discrepancy between crun and runc when disallowing access by default to devices with cgroups v1 #1438
Comments
I tried reproducing it using a Podman container created with how have you created the outer Docker container? Can you please verify the cgroup of the container process |
EDIT: I was looking at the wrong thing. They both create a cgroup, but I see the same configuration:
|
Hi @giuseppe, thanks for your reply.
The Docker config I'm running on my laptop is
I thought the behavior could be related to the cgroup driver, but I obtained the same results (i.e. different device allowed lists) when using runc/crun on a Ubuntu 20.04 VM using Docker with a I'll keep digging in how my container engines are setting up cgroups in the outer containers. |
do you get the same results with runc and crun? |
Apologies for the ambiguous wording. I get the same results on my OpenSUSE laptop and the Ubuntu 20.04 VM. The Docker cgroup driver is different between the 2 platforms: If I create the outside container with Podman, I still obtain crun/runc device cgroup differences. |
Hello, thank you for developing crun!
I use Docker containers as CI environments for developing container tools, so I often use OCI runtimes within privileged Docker containers.
I noticed that on systems with cgroups v1, when the bundle's
config.json
is set to disallow access to all devices by default, crun apparently allows all container devices, while runc abides to the config (besides the essential special devices it sets up on its own).For example, within a Fedora 39 Docker container:
The
config.json
is the following:The configuration of a privileged container (no user namespace) is intentional in this case.
I can reproduce the behavior described above only when calling crun within Docker containers, not when using it on native hosts.
What am I missing?
Thanks in advance for any help provided!
The text was updated successfully, but these errors were encountered: