The insights-runtime-extractor runs as a privileged DaemonSet (hostPID: true)
that scans container processes for runtime fingerprinting. When scanning a
container, the coordinator:
/crio.sock is hostPath-mounted)seteuid(target_uid) — changing the effective UID but leaving
the real UID and saved-set-UID at 0 and retaining the permitted
capability setcheck_no_privileged_perms() guard inspects only the Effective capability
set (so it passes), and is skipped entirely when the target runs as uid 0VersionExecutable fingerprint invokes fpr_kind_executable with
process.command_line[0] — the targets argv[0], read from
/proc/<pid>/cmdline and fully controlled by the workloadfpr_kind_executable calls exec.Command(executable, --version).Output()
— executing the workloads own binary inside the workloads mount
namespace while ruid=0 in the host user namespaceThe executed process can call setuid(0) to restore full root with
CAP_SYS_ADMIN, and inherits the orphaned cwd which resolves into the extractor
containers filesystem containing the host CRI-O socket.
File: extractor/src/insights_runtime_extractor.rs
| |
| |
File: fingerprints/pkg/utils/file.go
| |
File: version_executable.rs
| |
Attacker: Any tenant able to schedule a pod (unprivileged, any namespace) Victim: The node running the insights-runtime-extractor DaemonSet Trigger: Automatic — the DaemonSet scans all container processes on the node
Attack sequence:
node, python, python3, MainThread,
or contains java)setuid(0) to restore rootCAP_SYS_ADMIN in the host user
namespaceThe product performs an operation at a privilege level that is higher than the minimum level required, which creates new weaknesses or amplifies the consequences of other weaknesses.
| Name | Vendor | Start Version | End Version |
|---|---|---|---|
| Red Hat OpenShift Container Platform 4.21 | RedHat | openshift4/insights-runtime-extractor-rhel9:1792008935 | * |