Skip to main content

Kernel hardening profiles

Syself Linux protects files on disk with dm-verity, but a privileged container can still reach the running kernel in memory. It can write to kernel memory through /dev/mem or extract secrets with a tracer. Kernel lockdown closes that boundary in memory, trading off observability tools that rely on the same interfaces. The kernelProfile cluster variable controls how strictly each node pool enforces this protection.

The profiles 

Profile Kernel arguments added What a privileged pod can no longer do What keeps working
standard None Nothing changes. This is the default, and a node boots as it did before. Everything
hardened lockdown=integrity Modify the running kernel: opening /dev/mem or /dev/port, writing through debugfs, loading any kexec image (even the node's own kernel), and writing MSRs or PCI configuration space are blocked eBPF tracing with kprobes, tracepoints, and fentry, tracefs, profiling, and runtime security agents
sealed lockdown=confidentiality and sysctl.kernel.kptr_restrict=2 Read kernel memory or internal state, plus everything hardened blocks: tracefs is empty, so kprobes and tracepoints cannot attach; fentry programs and programs that read kernel memory fail to load; /proc/kallsyms addresses return zeros Workloads, runtimes, and networking that operate without inspecting kernel internals, and eBPF programs attached to raw tracepoints

Pick hardened when you want privileged pods kept out of the kernel and still run eBPF observability. Pick sealed for pools where nothing needs to look inside the kernel, such as nodes that run untrusted or regulated workloads, and where you accept losing most kernel tracing on those nodes.

The kernel's module signing applies under every profile: an unsigned module never loads. See for the rest of the kernel hardening.

Set the profile 

kernelProfile is a cluster variable. Set it in spec.topology.variables for every node, then override it for the control plane or for a single worker pool. A node takes its pool's override if there is one, otherwise the cluster value.

yaml
				apiVersion: cluster.x-k8s.io/v1beta2
kind: Cluster
metadata:
  name: mycluster
spec:
  topology:
    variables:
      - name: kernelProfile
        value: hardened # every node without an override
 
    controlPlane:
      class: hcloud
      replicas: 3
      variables:
        overrides:
          - name: kernelProfile
            value: sealed # the control plane runs no tracers
 
    workers:
      machineDeployments:
        - class: workeramd64hcloud
          name: md-observability
          replicas: 2
          variables:
            overrides:
              - name: kernelProfile
                value: standard # this pool runs an eBPF profiler
			

The value must be standard, hardened, or sealed, in lower case. Anything else is rejected when you apply the Cluster, for the cluster value and for an override alike:

				The Cluster "mycluster" is invalid: spec.topology.workers.machineDeployments[md-observability].variables.overrides[kernelProfile].value: Unsupported value: "\"Sealed\"": supported values: "standard", "hardened", "sealed"
			

A new Cluster already lists kernelProfile with the value standard in spec.topology.variables. To change it with kubectl patch, replace the entry.

What changes when you apply it 

The profile is part of each node's boot configuration, so a change replaces nodes instead of switching a running kernel. Changing the cluster value rolls the control plane and every worker pool that has no override of its own. Changing an override rolls only that pool. The roll follows the same rules as any other node replacement; see . A bare-metal pool has no spare server to roll onto, so it reinstalls its servers one at a time and runs one node short until each is back.

Every node carries its profile as a label, autopilot.syself.com/kernel-profile=<profile>, set when the node registers:

				$ kubectl get nodes -L autopilot.syself.com/kernel-profile
NAME                                     STATUS   ROLES           AGE   VERSION   KERNEL-PROFILE
mycluster-md-observability-txwx5-k7bzj   Ready    <none>          38m   v1.37.3   standard
mycluster-md-0-ptljb-sb5m7               Ready    <none>          18m   v1.37.3   hardened
mycluster-n472t-2dxs4                    Ready    control-plane   7m    v1.37.3   sealed
			

To confirm the kernel runs at the profile's level, read the lockdown state from a debug pod. The active level is in brackets:

				$ kubectl debug node/<node-name> -it --profile=sysadmin --image=busybox -- cat /host/sys/kernel/security/lockdown
none [integrity] confidentiality
			

A standard node shows [none], a hardened node [integrity], and a sealed node [confidentiality]. The path starts with /host because the debug pod mounts the node's root filesystem there.

Keep tracers off sealed nodes 

Use the label to schedule tools that need kernel access only where they can run. An eBPF profiler or tracer DaemonSet that lands on a sealed node cannot attach kprobes, tracepoints, or fentry programs, and only tools built on raw tracepoints keep working, so keep the others off those nodes with node affinity:

yaml
				affinity:
  nodeAffinity:
    requiredDuringSchedulingIgnoredDuringExecution:
      nodeSelectorTerms:
        - matchExpressions:
            - key: autopilot.syself.com/kernel-profile
              operator: NotIn
              values: ["sealed"]
			

Runtime security agents depend on the same kernel access. Tetragon does not start on a sealed node at all. Before you move a pool to sealed, run your agent on one sealed pool first and check that it still loads and reports. covers agents that enforce through the kernel.

Limits 

Lockdown does not confine a privileged pod. It protects the kernel, not the node. A privileged pod still read all the files and write files on the host in the writeable /var partition, sees every process, and uses the host network. Keep privileged pods out of your namespaces with .

The profile is set at boot. A running kernel never lowers its lockdown level, so the platform applies a new profile by replacing the pool's nodes, not by changing them in place.