Pcornel
Security · Linux Security

Linux Capabilities

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

Back to the Topic

Answer

Linux Capabilities split traditional root privilege into per-thread privilege bits with permitted, effective, inheritable, bounding and ambient sets, plus file capabilities and namespace context.

Remember

  • Non-root process ≠ unprivileged process when capabilities are effective.
  • One narrow capability ≠ low risk; some capabilities enable broad privilege or escape paths.
  • Configuration file present ≠ parsed, loaded and effective runtime state.
  • One allow/deny result ≠ complete DAC, privilege, LSM, firewall and application outcome.

First checks

  • getcap -r / 2>/dev/null — file capabilities
  • capsh --print — current process caps
  • grep Cap /proc/<pid>/status — process capabilities

Verify in this order

process → capability set → privileged operation allowed

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 → Linux Capabilities 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=4575

Confirmation

Confirm action

Continue?