🇰🇷 한글 설명
MySQL 5.5의 설치 후 스크립트(mysql-server-5.5.postinst)에서 발생하는 레이스 컨디션으로 인해 구성 파일이 권한 제한 전에 전 세계 읽기 가능한 상태로 생성됩니다. 로컬 사용자가 이 시간 동안 파일에 접근하여 데이터베이스 자격증명 등 민감한 정보를 탈취할 수 있습니다.
💡 쉬운 설명
MySQL 설치 중 설정 파일이 잠깐 동안 모든 사용자가 볼 수 있게 노출됩니다. 컴퓨터에 접근 가능한 다른 사용자가 이 시간에 파일을 읽어 데이터베이스 암호를 훔칠 수 있습니다.
🇺🇸 원문 (English)
Race condition in the post-installation script (mysql-server-5.5.postinst) for MySQL Server 5.5 for Debian GNU/Linux and Ubuntu Linux creates a configuration file with world-readable permissions before restricting the permissions, which allows local users to read the file and obtain sensitive information such as credentials.
📍 영향받는 시스템
MySQL Server 5.5 for Debian GNU/Linux and Ubuntu Linux (mysql-server-5.5.postinst 스크립트)
⚔️ 공격 벡터
로컬 사용자가 MySQL 설치/업그레이드 중 임시로 전 세계 읽기 가능하게 노출되는 구성 파일을 읽어 자격증명 탈취
🛡️ 대응 방법
mysql-server-5.5.31-1 이상으로 업그레이드하거나 postinst 스크립트의 파일 권한 설정 수정 (chmod 600)
🔧 검증 코드
명령어 출력이 5.5.31 이상 버전을 보이면 안전하고, 그 이하 버전이면 취약한 상태입니다.
dpkg -l mysql-server-5.5 2>/dev/null | grep -E '5\.5\.[0-9]' | awk '{print $3}' | grep -E '^5\.5\.(3[1-9]|[4-9][0-9])'