Windows kubectl cp の任意パスへの書き込みを修正
medium攻撃者がコピー元コンテナを制御している場合、悪意のあるアーカイブ内のパスによって意図した保存先から抜け出し、ローカルユーザーのシステム権限で許可された任意の場所にファイルを書き込める可能性がありました。アップグレード後は、こうしたパスで保存先の外に書き込めなくなります。
原文を表示
A path traversal vulnerability exists in the `kubectl cp` command when it is run on Windows. `kubectl cp` copies files between containers and the user machine. To copy files *from* a container, Kubernetes runs `tar` inside the container to create a tar archive, copies it over the network, and `kubectl` unpacks it on the user's machine. If the `tar` binary in the container is malicious, it could run any code and output unexpected, malicious results. An attacker who controls the contents of a container could use this to write files to arbitrary paths on the user's machine when `kubectl cp` is called, limited only by the system permissions of the local user. This issue only affects clients on Windows platforms. You are affected if you run the `kubectl` client on Windows and use `kubectl cp` to copy files *from* a container whose contents you do not fully control. Prior to upgrading, this vulnerability can be mitigated by only copying files from containers you trust, or by avoiding `kubectl cp` from untrusted containers on Windows.github.com/kubernetes/kubernetes/issues/141294
kubectl cp path traversal on Windows allows arbitrary file writesgithub.com/kubernetes/kubernetes/issues/141294