[Bug]: youki rejects valid linux.devices paths outside /dev
Bug Description
Create rejects /data/custom-null because it is not under /dev. The dev/nodev option cases fail for the same reason at /stack/null, before their mount-option assertions run; they are supporting manifestations of this one device-path problem.
This report uses OCI Runtime Specification v1.3.0. The historical failure was also observed in the saved failure retest. The attached youki-devices-outside-dev-reproducer.tar.gz contains the exact case inputs, framework sources and recorded evidence. The exported entry point has only been checked statically, not executed.
Steps to Reproduce
OCI explicitly permits a configured device path anywhere in the container filesystem, notably outside /dev.
Steps to reproduce the issue
Use Linux/WSL2 as root with Python 3, a native C compiler/static libc, and a built runtime. The selected cases declare additional host prerequisites in case.json (for example iproute2/network namespaces or writable cgroup v2 with HugeTLB). Unsupported prerequisites yield SKIP; a failed baseline or valid control is an infrastructure error.
Download the attached youki-devices-outside-dev-reproducer.tar.gz into a fresh working directory, then extract it and run from the extracted directory:
tar -xzf youki-devices-outside-dev-reproducer.tar.gz
cd youki-devices-outside-dev
python3 reproducer/reproduce.py --check-only
sudo python3 reproducer/reproduce.py --runtime /absolute/path/to/youki --output /tmp/youki-devices-outside-dev-replayThe output directory must be new. Each session uses a private mount namespace, a private runtime state root and a unique container ID. Fixtures and cleanup are the original tested framework code. Network fixtures create their own network namespace and veth; they do not move an existing host interface.
The script builds the static probe, checks the runtime baseline, runs paired controls where present, records the candidate and attempts cleanup. Exit 0 means all selected candidates PASS; 1 means an assertion FAIL was collected; 2 means ERROR/SKIP/incomplete execution. Read report.json and per-session result.json, especially cleanup and prerequisite records. A FAIL from another environment still needs review against the expected behavior above.
The configuration templates in the attachment use ${BUNDLE}, ${RESULT}, ${HOOK}, ${PYTHON} and fixture-specific tokens; the included runner renders them. Do not pass an unrendered template directly to the runtime.
Candidate configurations in the extracted directory:
reproducer/cases/R47-explicit-devices/outside-dev/config.jsonreproducer/cases/R42-mount-options/dev/config.jsonreproducer/cases/R42-mount-options/nodev/config.json
youki-devices-outside-dev-reproducer.tar.gz
Expectation
No response
System and Setup Info
What version of youki are you using?
youki version: 0.7.0
commit: 0.7.0-993a50ffb788be1a1a879f3446c10dd0c0b6a5a1
spec: 1.1.0
rustc: 1.96.0Tested source: 993a50ffb788.
Host OS information
Ubuntu 24.04.1 LTS, x86_64; root; cgroup v2.
Host kernel information
Linux 6.6.114.1-microsoft-standard-WSL2.
Additional Context
No response
Source: youki-dev/youki