169 words
1 minute
CVE-2016-9297: LibTIFF
2026-03-06

CVE-2016-9297#

Description#

Compile#

Download#

虽然 NVD 的 description 写是 4.0.6 版本的漏洞,但是 chall 的 description 说 4.0.4,那就用 4.0.4 吧。

Terminal window
git clone https://gitlab.com/libtiff/libtiff.git && cd libtiff
git checkout v4.0.4

Build#

Terminal window
mkdir ../libtiff-build-fuzz-asan
cd ../libtiff-build-fuzz-asan
AFL_USE_ASAN=1 \
CC=afl-clang-lto \
CXX=afl-clang-lto++ \
../libtiff/configure \
--prefix="$(realpath ../libtiff-fuzz-asan)" \
--disable-shared
AFL_USE_ASAN=1 make clean && make -j`nproc` && make install

make 的时候遇到两个定义不完整的报错,直接在 tif_predict.h 中加入下面两行即可:

#include "tiffio.h"
#include "tiffiop.h"

Samples#

TODO

Fuzzing#

编译出来发现有一堆程序,哪个才是我们的目标呢?

查看 NVD 给出的 references,其中 Bug 2590 - CVE-2016-9297: segfault in _TIFFPrintField (tif_print.c:127) 写道:

Triggered in libtiff 4.0.6 with AFL and ASAN. Only crashes if I LD_PRELOAD AFL’s libdislocator (more info: https://github.com/mirrorer/afl/tree/master/libdislocator).

LD_PRELOAD=/root/afl-2.35b/libdislocator/libdislocator.so ./tiffinfo -i test000

由此可知我们 fuzz 的目标是 tiffinfo

Analysis#

TODO

CVE-2016-9297: LibTIFF
https://cubeyond.net/posts/fuzz/libtiff-cve-2016-9297/
Author
CuB3y0nd
Published at
2026-03-06
License
CC BY-NC-SA 4.0