Skip to main content
Menu
Advisories

Advisory

Writable LinkLogs Bind Lets a Pod Redirect Conmon Log Appends to a Host File

GHSA-PW8R-75CR-C993Published Updated GitHub

Description

Impact

When a container uses the opt-in link-logs.crio.io annotation, CRI-O exposes the pod's log directory through a pod-owned emptyDir and intends that view to be read-only. That isolation was not effective, so a container could alter host-side log state that CRI-O and conmon depend on. This gave the container a way to influence writes made by a privileged component against host files outside its own log directory, crossing the container-to-host integrity boundary; where such a file is later executed by the host, it can amount to command execution as root.

The flaw exists since the feature's introduction in 1.28.0 and is reachable only when the annotation is enabled for the runtime handler; deployments that do not enable it are unaffected. Exploitation depends on pre-existing host state and remains subject to mandatory access control (MAC) policy, which places the attack complexity at high.

Patches

The linked log volume is now mounted read-only in containers even when the container requests write access, including when the volume is reached through kubelet subPath bind aliases. The host-side view stays writable to CRI-O itself so that log linking and SELinux labeling keep working. Users should upgrade to one of:

  • 1.37.4
  • 1.36.9
  • 1.35.12

This is a behaviour change: log collectors must keep writable state such as offsets and buffers in a separate volume.

Workarounds

  • Do not enable link-logs.crio.io for any runtime handler. Deployments that leave it out of allowed_annotations are not reachable through a pod.
  • Run the containers of affected pods as an unprivileged UID that cannot become uid 0 (runAsNonRoot, no setuid escalation, no user-namespace mapping to host root). Kubelet creates the pod and container log directories under /var/log/pods as root-owned and not writable by group or other (0755), so such a container cannot create entries in the linked tree. This is conditional hardening: pods whose containers run as root, whether requested or inherited from the image, remain exposed.

References

Credits

The CRI-O maintainers thank the reporter @oscarjhk and @yinxiL for reporting this vulnerability through coordinated disclosure.