Description
The png_check_keyword function in pngwutil.c in libpng before 1.0.42, and 1.2.x before 1.2.34, might allow context-dependent attackers to set the value of an arbitrary memory location to zero via vectors involving creation of crafted PNG files with keywords, related to an implicit cast of the '\0' character constant to a NULL pointer. NOTE: some sources incorrectly report this as a double free vulnerability.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 5.0 | libpng | 1.2.27-2+lenny2 | DSA-1750-1 |
| Debian 4.0 | libpng | 1.2.15~beta5-1+etch2 | DSA-1750-1 |
Advisories 1
- DSA-1750-1 libpng - several vulnerabilities Debian Security (DSA / DLA) · Mar 9, 2026
References
- http://libpng.sourceforge.net/index.html
- GLSA-200903-28 vendor-advisory
- libpng-pngcheckkeyword-memory-corruption(48128) vdb-entry
- SUSE-SR:2009:003 vendor-advisory
- 34388 third-party-advisory
- DSA-1750 vendor-advisory
- [oss-security] 20090109 libpng non issue mailing-list
- MDVSA-2009:051 vendor-advisory
- 34320 third-party-advisory
- [png-mng-implement] 20081126 Memory overwriting bug in png_check_keyword() mailing-list