Test: /ext/gd/tests/bug77269.phpt - Version 7.2.23        

Security #77269 efree() on uninitialized Heap data in imagescale leads to use-after-free
Submitted: 2018-12-09 08:50:30 Modified: 2019-01-07 08:09:48
From: sscannell Assigned: stas
Status: Closed Package: GD related
PHP Version: 5.6.39 OS: Linux

There are 5 different diffs reported by users for this test.

Count Diff
3 (38%)
001+ mmap() failed: [12] Cannot allocate memory
002+
003+ mmap() failed: [12] Cannot allocate memory
001- Warning: imagescale():%S product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
002- in %s on line %d
003- ===DONE===
004+
005+ Fatal error: Out of memory (allocated 270532608) (tried to allocate 1073741824 bytes) in %s/bug77269.php on line 4
2 (25%)
001+ ** ERROR: process timed out **
001- Warning: imagescale():%S product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
002- in %s on line %d
003- ===DONE===
1 (13%)
001+
001- Warning: imagescale():%S product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
002- in %s on line %d
003- ===DONE===
1 (13%)
001+ Warning: imagecreate(): product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
001- Warning: imagescale():%S product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
1 (13%)
001+ mmap() failed: [12] Cannot allocate memory
002+
003+ mmap() failed: [12] Cannot allocate memory
001- Warning: imagescale():%S product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
002- in %s on line %d
003- ===DONE===
004+
005+ Fatal error: Out of memory (allocated 270532608) at /home/suam/Downloads/php-7.2.23/ext/gd/libgd/gd.c:3122 (tried to allocate 1073741824 bytes) in %s/bug77269.php on line 4