🇰🇷 한글 설명
OpenShift 빌드 프로세스의 docker-build 컨테이너가 노드의 /var/lib/kubelet/config.json 파일을 읽기-쓰기 권한으로 마운트하여, 공격자가 이 파일을 수정해 서비스 거부를 유발하거나 이미지 풀링 자격증명을 탈취할 수 있는 취약점입니다.
💡 쉬운 설명
OpenShift에서 빌드 컨테이너가 실수로 중요한 인증 파일에 쓰기 권한으로 접근 가능하도록 설정되어 있습니다. 공격자가 이 파일을 변조하면 새로운 컨테이너 이미지를 받지 못하게 막거나 암호를 훔칠 수 있습니다.
🇺🇸 원문 (English)
A flaw was found in the OpenShift build process, where the docker-build container is configured with a hostPath volume mount that maps the node's /var/lib/kubelet/config.json file into the build pod. This file contains sensitive credentials necessary for pulling images from private repositories. The mount is not read-only, which allows the attacker to overwrite it. By modifying the config.json file, the attacker can cause a denial of service by preventing the node from pulling new images and potentially exfiltrating sensitive secrets. This flaw impacts the availability of services dependent on image pulls and exposes sensitive information to unauthorized parties.
📍 영향받는 시스템
OpenShift Container Platform (특히 docker-build 전략을 사용하는 버전)
⚔️ 공격 벡터
빌드 권한을 가진 사용자 또는 공격자가 docker-build 파드 내에서 /var/lib/kubelet/config.json을 수정하여 노드의 이미지 인증 정보를 변조
🛡️ 대응 방법
/var/lib/kubelet/config.json 마운트를 읽기 전용(readOnly: true)으로 설정하거나 불필요한 마운트 제거 후 OpenShift 업데이트 적용
🔧 검증 코드
docker-build 전략을 사용하는 빌드가 나열되면, 각 빌드의 volumeMount 구성에서 /var/lib/kubelet/config.json이 readOnly로 설정되어 있는지 확인하세요.
kubectl get build -A -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.spec.source.dockerfile}{"\n"}{end}' | head -20