Overview
youki spec and runc spec generate different default config.json values in several fields. Some differences are intentional and spec-correct (e.g. terminal), but others may have security or compatibility implications.
This umbrella issue tracks the investigation and resolution of each discrepancy.
Background
When comparing the output of runc spec (via libcontainer/specconv/example.go) against youki spec (via oci-spec crate Spec::default()), the following differences were identified:
| Field |
runc spec |
youki spec |
process.terminal |
true |
false |
process.capabilities.inheritable |
not set |
[CAP_AUDIT_WRITE, CAP_KILL, CAP_NET_BIND_SERVICE] |
process.capabilities.ambient |
not set |
[CAP_AUDIT_WRITE, CAP_KILL, CAP_NET_BIND_SERVICE] |
linux.resources.devices |
[{allow: false, access: "rwm"}] |
[] (empty) |
linux.namespaces (cgroup) |
added only when cgroupv2 |
always included |
Tracked Items
Related Issues
Overview
youki specandrunc specgenerate different defaultconfig.jsonvalues in several fields. Some differences are intentional and spec-correct (e.g.terminal), but others may have security or compatibility implications.This umbrella issue tracks the investigation and resolution of each discrepancy.
Background
When comparing the output of
runc spec(vialibcontainer/specconv/example.go) againstyouki spec(viaoci-speccrateSpec::default()), the following differences were identified:runc specyouki specprocess.terminaltruefalseprocess.capabilities.inheritable[CAP_AUDIT_WRITE, CAP_KILL, CAP_NET_BIND_SERVICE]process.capabilities.ambient[CAP_AUDIT_WRITE, CAP_KILL, CAP_NET_BIND_SERVICE]linux.resources.devices[{allow: false, access: "rwm"}][](empty)linux.namespaces(cgroup)Tracked Items
process.terminaldefault — runc generatestrue, youki generatesfalse. OCI spec defines default asfalse, so youki is correct. Decide whether to document this intentional difference or align with runc for usability.process.capabilities.inheritableandambientnot set by default — runc deliberately omits these from the generated spec. Havinginheritablecapabilities allows them to be inherited acrossexecve, andambientcapabilities can be retained when executing setuid binaries. youki usesoci-speccrate'sLinuxCapabilities::default()which sets both. This is a potential security concern and is also related to theyouki execfailure bug.linux.resources.devicesdefault deny rule — runc includes{allow: false, access: "rwm"}to deny all device access by default, with individual allows added per device. youki generates an empty list, leaving device access unrestricted in the generated config.linux.namespacescgroup namespace — conditional vs unconditional — runc only adds the cgroup namespace when cgroupv2 is detected (cgroups.IsCgroup2UnifiedMode()). youki always includes it viaget_default_namespaces(). On cgroupv1 kernels older than 4.6, this could cause issues.Related Issues
youki execfails with "failed to drop capabilities" wheninheritableis set (directly triggered by theinheritable/ambientdefault difference)terminaldefault value