🇰🇷 한글 설명
PHP 4.4.5 이전과 PHP 5.2.1 이전 64비트 머신의 printf 함수 계열에서 정수 부호 관련 취약점입니다. 64비트에서 32비트로의 데이터 변환 시 음수 인수 처리 오류로 인해 임의 코드 실행이 가능하며, width/precision이 -1일 경우 내부 버퍼를 메모리의 임의 위치에 배치할 수 있습니다.
💡 쉬운 설명
PHP 함수의 데이터 변환 과정에서 음수를 잘못 처리하는 버그로, 공격자가 컴퓨터를 완전히 제어하는 악의적인 명령을 실행할 수 있습니다. 64비트 컴퓨터의 오래된 PHP 버전에서만 발생합니다.
🇺🇸 원문 (English)
Multiple integer signedness errors in the printf function family in PHP 4 before 4.4.5 and PHP 5 before 5.2.1 on 64 bit machines allow context-dependent attackers to execute arbitrary code via (1) certain negative argument numbers that arise in the php_formatted_print function because of 64 to 32 bit truncation, and bypass a check for the maximum allowable value; and (2) a width and precision of -1, which make it possible for the php_sprintf_appendstring function to place an internal buffer at an arbitrary memory location.
📍 영향받는 시스템
PHP 4.0.0 ~ 4.4.4, PHP 5.0.0 ~ 5.2.0 (64비트 Linux/Unix)
⚔️ 공격 벡터
특별히 조작된 printf 형식 문자열과 음수 인수를 통해 메모리 손상 및 임의 코드 실행
🛡️ 대응 방법
PHP를 4.4.5 이상 또는 5.2.1 이상으로 즉시 업그레이드
🔧 검증 코드
명령어 결과가 PHP 4.x (4.4.4 이하) 또는 PHP 5.0~5.2.0이면 취약 상태입니다.
php -v | grep -E 'PHP (4\.([0-3]|4\.[0-4])|5\.[01])'