| Title | https://sourceforge.net/projects/freeimage/ freeimage version <= svn-r1911 Heap-based Buffer Overflow |
|---|
| Description | Heap buffer overflow exists in function _MemoryReadProc.
Root Cause:
In LoadRGB, dwWidth/dwHeight are cast from uint32 to int without checking whether they exceed INT_MAX, allowing negative values to participate in memory allocation calculations (CWE-681 / CWE-20).
Reproduction:
environment: Ubuntu 24.04.4 LTS
export CFLAGS="-g -O0 -fsanitize=address,undefined -Wno-error=implicit-function-declaration" CXXFLAGS="-g -O0 -fsanitize=address,undefined -std=gnu++14 -Wno-error=implicit-function-declaration"
wget https://sourceforge.net/code-snapshots/svn/f/fr/freeimage/svn/freeimage-svn-r1911.zip
unzip freeimage-svn-r1911.zip
cd freeimage-svn-r1911/FreeImage/trunk
sed -i 's|Source/LibTIFF4/tif_getimage.c|Source/LibTIFF4/tif_getimage.c Source/LibTIFF4/tif_hash_set.c|' Makefile.srcs // Makefile.srcs is missing tif_hash_set.c, which must be added to make compilation succeed; this change does not affect program functionality.
make -j8
make install
cd ../../../
g++ -g -O1 -fsanitize=address,undefined -DFUZZ_FORMAT=FIF_DDS fuzz_plugin.cpp -l:libfreeimage.a -lm -lpthread -o fuzz_dds
Details:
https://sourceforge.net/p/freeimage/patches/201/ |
|---|
| Source | ⚠️ https://sourceforge.net/p/freeimage/patches/201/ |
|---|
| User | xiaoxiaoafeifei (UID 101803) |
|---|
| Submission | 11/12/2026 04:09 (19 days ago) |
|---|
| Moderation | 12/01/2026 07:12 (19 days later) |
|---|
| Status | Duplicate |
|---|
| VulDB entry | 237833 [Freeimage 3.18.0 Image File PluginDDS.cpp LoadRGB buffer overflow] |
|---|
| Points | 0 |
|---|