🇰🇷 한글 설명
Nix 패키지 관리자의 고정 출력 유도(fixed-output derivation) 등록 과정에서 심볼릭 링크를 잘못 처리하여 발생하는 취약점입니다. 공격자가 빌드 과정에서 임의의 파일 경로를 가리키는 심볼릭 링크를 생성하면, 루트 권한으로 실행되는 Nix 데몬이 이를 따라가 시스템의 민감한 파일을 덮어쓸 수 있습니다. 이로 인해 멀티유저 환경에서 일반 사용자가 루트 권한을 획득할 수 있습니다.
💡 쉬운 설명
Nix라는 프로그램이 파일을 저장할 때, 가짜 길(심볼릭 링크)을 따라가서 중요한 시스템 파일을 망가뜨릴 수 있는 문제입니다. 이를 이용하면 일반 사용자가 컴퓨터의 최고 관리자 권한을 몰래 뺏을 수 있습니다.
🇺🇸 원문 (English)
Nix is a package manager for Linux and other Unix systems. A bug in the fix for CVE-2024-27297 allowed for arbitrary overwrites of files writable by the Nix process orchestrating the builds (typically the Nix daemon running as root in multi-user installations) by following symlinks during fixed-output derivation output registration. This affects sandboxed Linux builds - sandboxed macOS builds are unaffected. The location of the temporary output used for the output copy was located inside the build chroot. A symlink, pointing to an arbitrary location in the filesystem, could be created by the derivation builder at that path. During output registration, the Nix process (running in the host mount namespace) would follow that symlink and overwrite the destination with the derivation's output contents. In multi-user installations, this allows all users able to submit builds to the Nix daemon (allowed-users - defaulting to all users) to gain root privileges by modifying sensitive files. This vulnerability is fixed in 2.34.5, 2.33.4, 2.32.7, 2.31.4, 2.30.4, 2.29.3, and 2.28.6.
📍 영향받는 시스템
Nix (Linux sandboxed builds), macOS sandboxed builds는 영향 없음
⚔️ 공격 벡터
빌드 과정에서 임의의 파일 경로를 가리키는 심볼릭 링크를 생성하여 Nix 데몬의 파일 덮어쓰기 유도
🛡️ 대응 방법
Nix 버전을 2.34.5, 2.33.4, 2.32.7, 2.31.4, 2.30.4, 2.29.3, 2.28.6 중 하나 이상으로 업데이트
🔧 검증 코드
명령어 실행 결과로 보안 패치가 적용된 버전 번호가 출력되면 안전합니다.
nix --version | grep -E '2\.(34\.5|33\.4|32\.7|31\.4|30\.4|29\.3|28\.6)'
📊 CVSS Vector String
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
💻 영향받는 소프트웨어
NVIDIA Cloud Gaming Guest Driver for Linux