This is unreleased documentation for Runtime Enforcer 0.13-dev.

Known limitations

This document tracks the current, known limitations of Kubewarden Runtime Enforcer. Some are explicit design decisions, some are constraints inherited from upstream components (kernel/eBPF, Kubernetes, container runtimes). The goal is to help you understand the limitations and make informed decisions about your Runtime Enforcer deployment.

Privileged containers can run code outside their allow-list

Runtime Enforcer checks each executable against the allow-list of the container. The allow-list holds paths, for example /usr/bin/sleep. The check is valid only for files on the root file system of the container itself. Runtime Enforcer trusts the pod spec. It assumes that host volumes, mount propagation, and OCI mounts are intentional.

A privileged container can open files on another root file system, such as the host. Runtime Enforcer detects this case and denies it by default. For details, refer to Foreign root executions.

This check covers only one bypass. Other bypasses remain, and the sections below list them. Standard container hardening is the main defense against them. Runtime Enforcer adds a layer on top of it.

Bypass categories left to other layers

Runtime Enforcer checks the path of each executable. It does not check what the file contains, and it does not see what a running program does. An attacker can use this in many ways, including the categories below. Runtime Enforcer does not stop these ways. You must stop them with other controls.

Mount and root manipulation

The attacker changes which file a path points to.

A container with CAP_SYS_ADMIN can mount its own file over an allowed path, for example over /usr/bin/sleep. The path stays the same, but the file is now the file of the attacker. The container can also change its root directory or create a new mount namespace. Then a crafted file can match an allowed path.

Syscalls and tools that do this: mount --bind, mount_setattr, pivot_root, chroot, setns, and unshare or clone with CLONE_NEWNS.

Mitigation: drop CAP_SYS_ADMIN and CAP_SYS_CHROOT. A seccomp deny-list helps, but it cannot filter the arguments of clone3 or setns.

Interpreter and loader abuse

The attacker runs code that is not an executable file.

An interpreter is an allowed executable that runs any code that you give to it. For example, if python is in the allow-list, the container can run any Python script. Runtime Enforcer sees only that python started. It does not see the script.

Examples: bash, sh, python, and the loader ld.so.

Mitigation: put only your application binaries in the allow-list. Refrain from adding interpreters or shells to it.

Host volumes and host file system access

The attacker replaces the content of a file that the allow-list trusts.

Runtime Enforcer matches the path of an executed file. It does not check the content. A file in the container can also be reachable from outside the container. For example, it is on a hostPath volume or on a volume that another pod shares. Anybody who can write to the file from outside can replace it. The path stays the same, but the content is different. The replaced file still runs.

Mitigation: mount such volumes read-only. Limit who can write to the host path. Review each hostPath.

Direct tampering with Runtime Enforcer

The attacker turns off the enforcement.

Some privileged operations let a process disable Runtime Enforcer or run code that the policy does not cover. Each operation needs one capability.

Operation Capability

bpf

CAP_BPF

init_module, finit_module

CAP_SYS_MODULE

ptrace

CAP_SYS_PTRACE

open_by_handle_at

CAP_DAC_READ_SEARCH

mknod

CAP_MKNOD

Mitigation: drop unnecessary capabilities.

Learning cap: 100 allowed executables per proposal

During learning, Runtime Enforcer writes observed executable paths into a WorkloadPolicyProposal under spec.rulesByContainer[*].executables.allowed.

To bound proposal growth, the learning controller stops adding new entries once the proposal contains 100 distinct allowed executables in total (summed across all containers in rulesByContainer). This is a design decision.

  • Impact: if a workload executes more than 100 distinct executables, the proposal becomes “full” and additional executables won’t be learned automatically. In that case you may need to curate and trim the list or manage policy contents manually.

In some scenarios the full workload name is not extracted

With NRI, Runtime Enforcer derives the workload name from the pod name format and a small set of well-known labels. In some scenarios this information isn’t sufficient to reconstruct the original controller name.

This happens when Kubernetes truncates pod names due to the 63-character limit (common with long Deployment/DaemonSet names), which can remove parts of the name and/or separators that would otherwise allow reliable parsing.

In these cases, Runtime Enforcer may only be able to report a shortened, best-effort workload name and won’t be able to extract the full workload name.

  • Impact: workload names shown in policy proposals and violation reporting can be incomplete and may not exactly match the original Kubernetes resource name. Since workload type and name name is also used to derive the WorkloadPolicyProposal resource name, the proposal may be created under an unexpected name, which can make it look like learning didn’t happen.

Static pods: API-server Pod UID can’t be resolved via NRI

For Kubernetes static pods, the Pod UID used by the kubelet and the Pod UID assigned by the Kubernetes API server can differ.

In the NRI context, Runtime Enforcer can’t reliably retrieve the API-server Pod UID for static pods, and instead relies on the UID available via NRI.

  • Impact: when correlating Runtime Enforcer events/policies with Kubernetes objects, the Pod UID may not match what you see on the Pod object returned by the Kubernetes API for static pods.

NRI may not be enabled by default for containerd prior to v2.0

Runtime Enforcer requires NRI to be enabled in the container runtime. On containerd versions prior to v2.0, NRI may be available but not enabled by default, depending on how containerd is packaged/configured in your distribution.

  • Impact: if NRI isn’t enabled, Runtime Enforcer won’t be able to learn and resolve container identity correctly and may fail to operate as expected. You have to enable NRI manually.

ReplicaSet isn’t supported as a workload for learning

Runtime Enforcer doesn’t currently learn policies with ReplicaSet as the workload identity.

In the NRI context, Runtime Enforcer derives the “workload kind/name” primarily from the pod name and a small set of well-known labels. This works for common workload types (for example, Deployment, DaemonSet), but it isn’t sufficient to reliably identify a pod as belonging to a ReplicaSet in the general case.

As a result, pods created by standalone ReplicaSet may be treated as plain Pod workloads for learning and reporting purposes.

  • Impact: policy proposals and violation reporting may not group/label these pods under a ReplicaSet workload, and may not match the workload identity you expect. Please use other workload types (for example, Deployment, DaemonSet) when you want reliable workload attribution and policy learning.

arm64: kernels prior to 6.4 are not supported

On arm64/aarch64, Runtime Enforcer requires a Linux kernel version >= 6.4.

  • Impact: on older arm64 kernels, Runtime Enforcer may fail to load eBPF programs or may not function correctly.

cri-dockerd is not supported

Runtime Enforcer doesn’t support running Kubernetes with Docker via cri-dockerd, and there are no plans to add support.

Runtime Enforcer relies on container-runtime integration that provides consistent container/pod identity information (NRI). cri-dockerd doesn’t meet this requirement, so container attribution and policy enforcement behavior isn’t reliable in that environment.

  • Impact: Runtime Enforcer may fail to start correctly, or may be unable to reliably attribute processes to containers/workloads. Please use a supported container runtime (containerd or CRI-O) instead.