[php-src] PR #24722: Fuzz exif thumbnail handling
| From: | yumasansansan | Date: | Mon, 26 Oct 2026 07:08:54 +0000 |
| Subject: | [php-src] PR #24722: Fuzz exif thumbnail handling | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-39895@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/24722
Author: yumasansansan
php-fuzz-exif calls exif_read_data($stream) with the default arguments.
With $read_thumbnail = false, the thumbnail is never extracted
(ImageInfo->read_thumbnail gates several code paths in
ext/exif/exif.c), and exif_thumbnail() is not called at all.
The fuzzer now calls exif_read_data($stream, null, false, true) and
exif_thumbnail($stream, $width, $height, $type). Passing
$width/$height makes exif_thumbnail() call
exif_scan_thumbnail().
Replaying the checked-in sapi/fuzzer/corpus/exif (no fuzzing):
| Function | Before (edges) | After (edges) |
|---|---|---|
| zif_exif_thumbnail | not reached | 13/45 |
| exif_thumbnail_build | not reached | 29/73 |
| exif_thumbnail_extract | not reached | 3/11 |
| exif_thumbnail_in_file | not reached | 2/4 |
| exif_scan_thumbnail | 2/48 | 8/48 |
The input format is unchanged, existing corpora stay valid.