Description
kata-agent applies linux.maskedPaths by bind-mounting /dev/null over each entry and treating ENOTDIR as success (mask_path in src/agent/rustjail/src/mount.rs). A directory in the list is left alone.
With containerd's default list, /sys/firmware stays visible in every kata container, and a container can read the guest's ACPI tables, SMBIOS table and memory map under it. /proc/acpi is left unmasked too, but is empty with the kata guest kernel. The other default directories do not exist in the guest, and the per-CPU thermal_throttle entries containerd adds are dropped the same way.
Reproduce with containerd and kata 4.3.1 on x86_64:
ctr run --rm --runtime io.containerd.kata.v2 docker.io/library/alpine:3.22 t \
sh -c 'ls /sys/firmware; ls /sys/firmware/acpi/tables'
runc: /sys/firmware is empty. kata: acpi devicetree dmi memmap, and the tables are readable.
Expected: the behavior of runc and crun, which mount an empty read-only tmpfs over a masked directory and share one tmpfs between all of them (runc maskPaths, crun mount_masked_dir, see opencontainers/runc#5275 and containers/crun#2304).
readonlyPaths is not affected; readonly_path handles directories.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
agent: mask directories in maskedPaths with a shared read-only tmpfs
dims commentedon Nov 1, 2026
cc @zvonkok @fidencio
agent: mask directories in maskedPaths with a shared read-only tmpfs
agent: mask directories in maskedPaths with a shared read-only tmpfs