criu

CRIU Image Security & State Restoration

Overview

CRIU (Checkpoint/Restore In User-space) image files contain complete serialized process state, including raw memory pages, CPU register states, file descriptors, network credentials, and kernel security metadata. Because image files capture snapshots of in-memory data, they often contain sensitive plaintext secrets, such as TLS session keys, API tokens, user passwords, and decrypted application state.

To perform low-level process reconstruction, criu restore typically runs with elevated capabilities (such as CAP_SYS_ADMIN or CAP_CHECKPOINT_RESTORE). CRIU explicitly assumes that all image files provided to it are authentic, confidential, and have not been tampered with or inspected by an untrusted actor.

State Restoration & Security Boundaries

1. Accurate State Reconstruction

CRIU’s core guarantee is to faithfully restore processes to the exact state they were in when checkpointed, including their full security context (UID/GID, capabilities, Linux Security Modules like SELinux and AppArmor profiles, seccomp filters, namespaces, cgroups, etc.).

CRIU relies entirely on the metadata stored within the image files to reconstruct these security boundaries.

2. The Privilege Risk of Image Modification

Because CRIU accurately applies the security attributes defined inside the image files using its own execution privileges:

3. Information Disclosure Risk

Because image files store complete dumps of process memory and OS state, unauthorized read access to CRIU image files is equivalent to reading process memory via ptrace or inspecting live kernel core dumps. An untrusted actor with read access can extract secrets and security-critical data directly from the unencrypted memory images.

Design Assumptions & Non-Goals

Operational Recommendations

Because CRIU relies on the integrity and privacy of the input image set to enforce process security boundaries, operators must ensure image authenticity, integrity, and confidentiality before process restoration begins.

Depending on your deployment architecture, enforce the following core principles:

Ongoing & Future Enhancements

To make securing image artifacts simpler and more seamless for container runtimes and orchestrators, the CRIU team is actively exploring and developing:

This native mechanism will allow users to protect sensitive process memory in transit and at rest while ensuring that modified or unauthorized images are automatically rejected at the restore boundary.