Pcornel
Security · Linux Security

AppArmor

Cheat sheet · https://pcornel.dk/topic.php?topic=4568

Back to the Topic

Answer

AppArmor is a path-oriented Linux Security Module that confines named applications with enforce or complain profiles covering file, capability, network, mount and execution behavior alongside ordinary Linux controls.

Remember

  • AppArmor loaded ≠ target process attached to an enforcing profile.
  • Complain mode ≠ blocked enforcement; it normally permits and logs profile violations.
  • Configuration file present ≠ parsed, loaded and effective runtime state.
  • One allow/deny result ≠ complete DAC, privilege, LSM, firewall and application outcome.

First checks

  • aa-status — profiles loaded and modes
  • journalctl -k | grep -i apparmor — denials
  • aa-enforce /etc/apparmor.d/<profile> — enforce

Verify in this order

process → profile rules → allow/deny

Where it usually breaks

First mismatch in platform/workload identity → desired configuration → management/control plane → runtime enforcement → telemetry → workload/resource outcome; preserve identity/policy/pre-state before mutation.

Linux Security → AppArmor proof map

BoundaryEstablishDoes not establish
ScopeExact host, role, build/kernel, identity, workload and expected controlDoes not prove policy receipt or effective runtime state
Effective stateResultant/loaded policy, precedence, mode, labels/rules/keys and active services/kernel controlsConfiguration presence does not prove enforcement
Runtime evidenceCorrelated events/audit, process/token/credential, packet/syscall and workload resultOne event, clean status or allow/deny does not prove complete security
ClosureOriginal allowed/denied workload works, unsafe state is removed and recovery/regression passCommit, restart, block or compliance result alone is not closure

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4568

Confirmation

Confirm action

Continue?