リンクされたログボリュームへの書き込み脆弱性の修正
high影響対象リリースノートに記載なし
コンテナから CRI-O または conmon にログディレクトリー外のホストファイルを書き込ませることができ、ホスト側の整合性が損なわれるほか、対象ファイルが後で実行された場合には root 権限でコマンドを実行される可能性がありました。修正後、kubelet の subPath による bind エイリアス経由も含め、コンテナからリンクされたログボリュームは読み取り専用として見えます。一方、CRI-O はホスト側から引き続き書き込めます。ログ収集ツールはオフセットとバッファーを別の場所に保持する必要があります。
原文を表示
セキュリティアドバイザリ
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. 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: This is a behaviour change: log collectors must keep writable state such as offsets and buffers in a separate volume. - 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.github.com/cri-o/cri-o/security/advisories/GHSA-pw8r-75cr-c993