🇰🇷 한글 설명
ImageMagick의 BMP 디코더에서 32비트 시스템을 대상으로 하는 정수 오버플로 취약점이 발견되었습니다. 특정 크기의 악성 BMP 파일을 처리할 때 계산 오류로 인해 메모리 할당 문제가 발생할 수 있습니다. 이 취약점은 7.1.2-7 및 6.9.13-32 이전 버전에서 발생합니다.
💡 쉬운 설명
이미지 파일을 읽는 프로그램이 숫자를 계산하는 과정에서 너무 큰 숫자를 만나 계산 오류가 발생하는 문제입니다. 특수하게 제작된 이미지를 열기만 해도 프로그램이 오작동할 수 있습니다.
🇺🇸 원문 (English)
ImageMagick is an open source software suite for displaying, converting, and editing raster image files. In ImageMagick versions prior to 7.1.2-7 and 6.9.13-32, an integer overflow vulnerability exists in the BMP decoder on 32-bit systems. The vulnerability occurs in coders/bmp.c when calculating the extent value by multiplying image columns by bits per pixel. On 32-bit systems with size_t of 4 bytes, a malicious BMP file with specific dimensions can cause this multiplication to overflow and wrap to zero. The overflow check added to address CVE-2025-57803 is placed after the overflow occurs, making it ineffective. A specially crafted 58-byte BMP file with width set to 536,870,912 and 32 bits per pixel can trigger this overflow, causing the bytes_per_line calculation to become zero. This vulnerability only affects 32-bit builds of ImageMagick where default resource limits for width, height, and area have been manually increased beyond their defaults. 64-bit systems with size_t of 8 bytes are not vulnerable, and systems using default ImageMagick resource limits are not vulnerable. The vulnerability is fixed in versions 7.1.2-7 and 6.9.13-32.
📍 영향받는 시스템
ImageMagick 7.1.2-7 미만 및 6.9.13-32 미만 버전 (32비트 시스템 및 리소스 제한 상향 설정 시)
⚔️ 공격 벡터
특수하게 조작된 BMP 이미지 파일을 시스템에 업로드하거나 열도록 유도
🛡️ 대응 방법
ImageMagick를 최신 버전인 7.1.2-7 또는 6.9.13-32 이상으로 업데이트
🔧 검증 코드
출력된 버전이 7.1.2-7 또는 6.9.13-32보다 낮은지 확인하여 취약 여부를 판단합니다.
convert --version | grep -E 'ImageMagick (7\.[0-9]+|6\.[0-9]+)'