Uninitialized read in gdImageCreateFromXbm
Medium
I
Internet Bug Bounty
Submitted None
Actions:
Reported by
chamal
Vulnerability Details
Technical details and impact analysis
This bug is present in gdImageCreateFromXbm method of ext/gd/libgd/gd_xbm.c file.
This method contains below mentioned lines.
```c
...
unsigned int b;
...
sscanf(h, "%x", &b);
for (bit = 1; bit <= max_bit; bit = bit << 1) {
gdImageSetPixel(im, x++, y, (b & bit) ? 1 : 0);
...
```
So when sscanf method is not able to read a hex value, "b" variable will contain uninitialized data.
Bug Report : https://bugs.php.net/bug.php?id=77973
PHP Version : 7.1.29
CVE-ID : [2019-11038](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-11038)
## Impact
Uninitialized data may leak data from stack memory.
Related CVEs
Associated Common Vulnerabilities and Exposures
CVE-2019-11038
LOW
When using the gdImageCreateFromXbm() function in the GD Graphics Library (aka LibGD) 2.2.5, as used in the PHP GD extension in PHP versions 7.1.x below 7.1.30, 7.2.x below 7.2.19 and 7.3.x below 7.3.6, it is possible to supply data that will cause the function to use the value of uninitialized …
Report Details
Additional information and metadata
State
Closed
Substate
Resolved
Submitted
Weakness
Information Disclosure