criu

AppArmor Support

CRIU provides support for checkpointing and restoring AppArmor security profiles and namespaces. This is a critical feature for containerized environments (like Docker, LXC, or Podman) where each container frequently operates under its own set of specialized security policies.

How CRIU Handles AppArmor

AppArmor integration in CRIU ensures that restored processes continue to operate under the same security constraints as the original processes, while also managing the temporary permissions needed for the checkpointing process itself.

1. Checkpointing (Dumping)

During the dump phase, CRIU detects the AppArmor state of each task:

2. Restoration

Restoring AppArmor state involves re-establishing the security context before the process resumes:

Support for Stacking

Modern AppArmor implementations support Profile Stacking, where multiple security profiles are applied to a single process simultaneously (e.g., a container-wide profile plus a per-application profile). CRIU correctly identifies, dumps, and restores these complex stacked configurations.

Kernel Requirements

Reliable AppArmor C/R requires:

See also