🇰🇷 한글 설명
crun 1.28 미만 버전에서 컨테이너의 rootfs /dev 디렉토리가 O_NOFOLLOW 옵션 없이 열리는 취약점이 존재합니다. 공격자가 OCI 번들에 rootfs/dev를 심볼릭 링크로 포함할 경우, crun은 이를 따라가 컨테이너 외부의 대상 경로에 장치 노드 및 stdio 심볼릭 링크를 생성할 수 있습니다. 이 과정에서 기존 파일이 교체될 수 있으며, 1.28 버전에서 이 문제가 해결되었습니다.
💡 쉬운 설명
컨테이너를 실행할 때 프로그램이 잘못된 경로를 따라가서 컴퓨터 본체의 중요한 파일을 엉뚱한 곳에 덮어쓰거나 바꿀 수 있는 문제입니다. 이를 통해 시스템의 보안 설정이 망가질 위험이 있습니다.
🇺🇸 원문 (English)
crun is an open source OCI Container Runtime fully written in C. Prior to version 1.28, crun's default device setup opens the container rootfs `/dev` directory without `O_NOFOLLOW`. If an OCI bundle contains `rootfs/dev` as a symlink and the bundle configuration does not mount `/dev`, crun follows that symlink and creates the default device nodes and stdio symlinks at the symlink target outside the container rootfs. In a local rootful crun replay, this created fixed device nodes and symlinks outside the rootfs before crun returned failure. A pre-existing file named `ptmx` in the target directory was also replaced by crun's forced `ptmx -> pts/ptmx` symlink. Version 1.28 fixes the issue.
📍 영향받는 시스템
crun version < 1.28
⚔️ 공격 벡터
조작된 OCI 번들(심볼릭 링크 포함)을 사용하여 로컬 루트 권한으로 crun 실행
🛡️ 대응 방법
crun 버전을 1.28 이상으로 업데이트
🔧 검증 코드
출력된 버전 번호가 1.28 미만이면 취약한 상태이며, 1.28 이상이면 안전합니다.
crun --version 2>/dev/null | grep -E '1\.(2[8-9]|[3-9][0-9])|2\.' || crun --version