Skip to content
Discussion options

You must be logged in to vote

Not pointless, but the priority changes.

With krun, each container runs inside a lightweight VM (libkrun/libkrunfw), so you already have hardware-level isolation — the container process can't touch the host kernel directly. That makes most of the kernel-hardening directives (ProtectKernelModules, ProtectKernelTunables, SystemCallFilter, etc.) redundant in terms of host protection, since the guest kernel is separate.

What's still useful:

  • User=101 / NoNewPrivileges — defense in depth. If there's a VM escape (unlikely but not impossible), running as non-root inside the guest means the attacker lands with fewer privileges
  • ReadOnly=true — protects the container's own filesystem, which matters…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@user451421541757324
Comment options

Answer selected by user451421541757324
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants