News for hackers. Stuff that matters.
Re:Fun with gzip bombs and email clients by sarabob on Tuesday July 22, 2025 @05:56PM (#44653455)
Is there a reason the malicious part of the payload has to be pixels? You could have a 100x100px image with 000s of 2GB iTXt chunks, no? That would bypass naive header checks that only reject based on canvas size.
Re:Fun with gzip bombs and email clients by cogman10 on Tuesday July 22, 2025 @05:57PM (#44653472)
You'd probably do zTxt chunks right? But regardless I'd guess that there's nothing that would cause a renderer to actually read that chunk.
Re:Fun with gzip bombs and email clients by sarabob on Tuesday July 22, 2025 @06:12PM (#44653588)
Ah yes, that makes sense.

However, it may work with the article's process - a 100x100 png with lots of 2GB-of-nothing iTXt chunks could be gzipped and served with `Content-Encoding: gzip` - so it would pass the "is a valid png" and "not pixel-huge image" checks but still require decompression in order to view it.

Re:Fun with gzip bombs and email clients by odo1242 on Wednesday July 23, 2025 @03:20PM (#44662921)
Firefox seems to handle this correctly: it reads the first part of the image and displays the image, but stops decompressing after the full image file is read

Chrome and Safari both crash after using up all OS memory on the task (Safari crashes earlier and not as badly because it has a per-page memory limit)

Re:Fun with gzip bombs and email clients by cxr on Wednesday July 23, 2025 @01:22AM (#44655949)
The iTXt chunk can also be compressed <https://www.w3.org/TR/png/#10CompressionOtherUses>.