When running as a privileged user (e.g., having CAP_SYS_ADMIN on Linux), umoci is potentially vulnerable to attacks where OCI image layers (tar archives) contain inode information designed to create dangerous files, such as block devices with arbitrary major/minor numbers or unsafe set-uid binaries.
Defense Mechanism:
To mitigate this, umoci sets the bundle directory permissions to chmod go-rwx. This prevents unprivileged users from resolving dangerous inodes or setuid binaries created during the process.
Note on Rootless Mode:
If umoci is running in rootless mode, it is not susceptible to this specific attack because it relies on standard VFS operations and the operating system's existing access control restrictions.