Optipng is affected by a read/write out of bounds when processing malformed image files. This issue could be abused on server side applications that use optipng as external program for image processing. This issue was found with using american fuzzy lop.
Malicious input file: http://bugs.fi/media/afl/optipng/2/optipng-002.png
SHA1: 39723feaef1cd6182e93a2c3d02e19b447faaa41
Gdb backtrace: http://bugs.fi/media/afl/optipng/2/backtrace.txt
ASAN processing log: http://bugs.fi/media/afl/optipng/2/asan.txt
Valgrind: http://bugs.fi/media/afl/optipng/2/valgrind.txt
Optipng is used as external program in e.g. these software:
https://github.com/heyday/silverstripe-optimisedimage
https://github.com/jkphl/iconizr.git
https://github.com/christophlehmann/assetprocessor
https://github.com/psliwa/image-optimizer
Timeline:
2015-12-12: Reported to vendor via email (no reply yet)
2016-01-03: Emailed again to vendor and asked how to proceed
2016-01-03: Requested CVE identifier
2016-01-03: Created private item to issue tracker
Planning to announce this publicly this month (2016-01) if agreed with vendor.
Confirmed.
Thanks for the report. Here is the fix:
This should be applied in addition to what I already posted at https://sourceforge.net/p/optipng/bugs/56/
Fixed in version 0.7.6.