Is it pointless to harden quadlets if you use krun? #28765
-
|
Hi, I'm switching to krun and was wondering if hardening the quadlets is pointless since they're virtual machines. By "hardening" I mean: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
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 ( What's still useful:
What you can probably drop:
TL;DR: keep the stuff that hardens the process within its own environment ( |
Beta Was this translation helpful? Give feedback.
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 privilegesReadOnly=true— protects the container's own filesystem, which matters…