Pay1oad/Fuzzing Project : DVE

1-Day Vuln. analysis : CVE-2022-1115

T1deSEC 2025. 3. 21. 01:07

Abstract

Target : ImageMagick 7.1.0-28

 

Goal : Analyzing CVE-2022-1115

https://www.cvedetails.com/cve/CVE-2022-1115/

 

CVE-2022-1115 : A heap-buffer-overflow flaw was found in ImageMagick’s PushShortPixel() functi

CVE-2022-1115 : A heap-buffer-overflow flaw was found in ImageMagick’s PushShortPixel() function of quantum-private.h file. This vulnerability is triggered when an

www.cvedetails.com

 

CVE-2022-1115는 Heap-based Buffer Overflow 취약점입니다.

 

ImageMagick의 convert 기능으로 공격자가 조작한 TIFF 이미지 파일을 처리할 때, quantum-private.h에 존재하는 PushShortPixel() 함수에서 발생합니다.

 

Build

타겟 빌드를 진행합니다.

 

mkdir $HOME/fuzzing_imagemagick && cd $HOME/fuzzing_imagemagick
wget https://github.com/ImageMagick/ImageMagick/archive/refs/tags/7.1.0-28.tar.gz
tar -xzvf 7.1.0-28.tar.gz

sudo apt-get install autoconf automake autotools-dev libtool pkg-config gostscripts
sudo apt-get install libpng-dev libjpeg-dev libtiff-dev

cd ImageMagick-7.1.0-28
CLFAGS="-g -O0 -fno-omit-frame-pointer" CXXFLAGS="-g -O0 -fno-omit-frame-pointer" LDFLAGS="-g" ./configure --enable-shared=no --prefix="$HOME/fuzzing_imagemagick/install/"
make
make install

cd $HOME/fuzzing_imagemagick/install/bin
./magick

 

 

빌드 성공! 정상 작동합니다.

 

---------------------------------------------------------------------------------------------------------------------

Crash Reproduce Failed

어떤 이유에서인지 PoC 크래시 인풋을 넣어도 크래시가 발생하지 않고 정상적인 실행 Flow를 따라갑니다.

 

혹시나 해서 ImageMagick 버전을 낮춰서 다시 빌드하고 진행해 보았으나 크래시는 확인할 수 없었습니다.