🇰🇷 한글 설명
GNU Bash 5.0 패치 11 이전 버전에서 발생한 취약점으로, 권한을 낮추는 과정에서 저장된 UID(saved UID)가 제대로 처리되지 않는 문제입니다. 공격자가 쉘에서 명령을 실행할 수 있다면, 공유 객체를 로드하여 다시 높은 권한을 획득할 수 있습니다.
💡 쉬운 설명
프로그램이 보안을 위해 권한을 낮추려고 시도하지만, 실제로는 숨겨진 권한이 남아있는 결함입니다. 해커가 이 허점을 이용하면 원래 가질 수 없는 높은 관리자 권한을 다시 뺏어올 수 있습니다.
🇺🇸 원문 (English)
An issue was discovered in disable_priv_mode in shell.c in GNU Bash through 5.0 patch 11. By default, if Bash is run with its effective UID not equal to its real UID, it will drop privileges by setting its effective UID to its real UID. However, it does so incorrectly. On Linux and other systems that support "saved UID" functionality, the saved UID is not dropped. An attacker with command execution in the shell can use "enable -f" for runtime loading of a new builtin, which can be a shared object that calls setuid() and therefore regains privileges. However, binaries running with an effective UID of 0 are unaffected.
📍 영향받는 시스템
GNU Bash 5.0 패치 11 이전 버전 (Linux 및 saved UID 지원 시스템)
⚔️ 공격 벡터
쉘 내에서 'enable -f' 명령을 사용하여 악성 공유 객체를 런타임에 로드하고 setuid()를 호출함
🛡️ 대응 방법
Bash를 최신 보안 패치가 적용된 버전(5.0 패치 11 이상)으로 업데이트하십시오.
🔧 검증 코드
출력된 Bash 버전이 5.0 패치 11 미만인지 확인하여 취약 여부를 판단합니다.
bash --version | grep -E '5\.[0-9]'