🇰🇷 한글 설명
runc의 루트리스(rootless) 모드에서 특정 조건 하에 /sys/fs/cgroup 디렉토리에 대한 쓰기 권한이 허용되는 취약점입니다. 사용자 네임스페이스 내에서 cgroup 네임스페이스를 분리하지 않거나 특정 마운트 조건이 충족될 경우, 컨테이너가 호스트의 사용자 소유 cgroup 계층에 쓰기 권한을 얻을 수 있습니다.
💡 쉬운 설명
컨테이너를 관리하는 도구인 runc의 설정 오류로 인해, 컨테이너 내부 사용자가 호스트 시스템의 일부 설정 파일에 접근하여 수정할 수 있는 보안 허점이 발견되었습니다. 이는 컨테이너의 격리 기능을 약화시킬 수 있습니다.
🇺🇸 원문 (English)
runc is a CLI tool for spawning and running containers according to the OCI specification. In affected versions it was found that rootless runc makes `/sys/fs/cgroup` writable in following conditons: 1. when runc is executed inside the user namespace, and the `config.json` does not specify the cgroup namespace to be unshared (e.g.., `(docker|podman|nerdctl) run --cgroupns=host`, with Rootless Docker/Podman/nerdctl) or 2. when runc is executed outside the user namespace, and `/sys` is mounted with `rbind, ro` (e.g., `runc spec --rootless`; this condition is very rare). A container may gain the write access to user-owned cgroup hierarchy `/sys/fs/cgroup/user.slice/...` on the host . Other users's cgroup hierarchies are not affected. Users are advised to upgrade to version 1.1.5. Users unable to upgrade may unshare the cgroup namespace (`(docker|podman|nerdctl) run --cgroupns=private)`. This is the default behavior of Docker/Podman/nerdctl on cgroup v2 hosts. or add `/sys/fs/cgroup` to `maskedPaths`.
📍 영향받는 시스템
runc 1.1.5 미만 버전 (Rootless 모드 사용 시)
⚔️ 공격 벡터
루트리스 환경에서 cgroup 네임스페이스를 공유하거나 특정 마운트 조건이 설정된 상태로 컨테이너 실행
🛡️ 대응 방법
runc를 1.1.5 버전 이상으로 업그레이드하거나, 컨테이너 실행 시 --cgroupns=private 옵션을 사용하여 cgroup 네임스페이스를 분리함
🔧 검증 코드
출력 결과가 VULNERABLE이면 취약한 버전이며, SAFE이면 안전한 버전입니다.
runc --version | grep -E 'runc version [0-9]+\.[0-9]+\.[0-5]+' | awk '{print $3}' | awk -F. '{if ($1 == 1 && $2 == 1 && $3 < 5) print "VULNERABLE"; else print "SAFE"}'