Thread with 12 posts

jump to expanded post

me: so, the purpose of the adler-32 checksum at the end of a png’s zlib stream…
you: …is to check the data integrity, right?
me: no, the purpose of a system is what it does
you: oh no
me: and what it does is let the decompressor have little a buffer overrun, as a treat
you:

Open thread at this post
Fabian Giesen , @rygorous@mastodon.gamedev.place
(open profile)

@hikari That is incorrect. There've been several vulns in stb_image but this was never one of them.

All the reads in that path go through zget8 which just keeps going and returning 0 (and not advancing the read cursor) at the end of the buffer. So no actual overrun.

The actual original issue was that in certain situations you could get stuck in an infinite loop reading ever more implicit zeros that way, never returning an error. (So DoS)

Open remote post (opens in a new window)