The first fuzz run on cnx01 found it: a drawn signature of 798 bytes whose PNG header says 300 x 738,197,594 pixels made krilla ask for 885 GB. A failed allocation aborts the process, so one such signature on any client link (or such an upload in a pack) would have ended the app for everyone; reproduced on a normal build, with a valid IHDR checksum. krilla decodes a picture as soon as it makes it, so papers::pixels reads the size from the header first, with the decoder krilla uses (png, zune-jpeg, image-webp; already in Cargo.lock, now direct dependencies), and papers::picture refuses more than MAX_PIXELS (50 megapixels, about 200 MB decoded) before krilla sees the file. The pack and the Documents tab print a note for such a file, the signed copy refuses it, and the client page refuses the signature (422, "did not arrive whole") before anything is stored. tests/fuzz_cases/signed_copy/png-claims-885-gigabytes is the finding, replayed on every push; unit tests for the header sizes and the limit, and the agreements test sends the forged signature.
9 lines
505 B
Markdown
9 lines
505 B
Markdown
Inputs that once broke the fuzz target `signed_copy` (src/fuzzing.rs), replayed by
|
|
`tests/fuzz_cases.rs`. Name each after what it broke.
|
|
|
|
- `png-claims-885-gigabytes`: the drawn signature with its header changed to
|
|
300 x 738,197,594 pixels (found Nov 23, 2026; the IHDR checksum set right,
|
|
since only fuzzing builds of the png crate skip it). Decoding it asked for
|
|
885 GB and the failed allocation ended the process; `papers::picture` now
|
|
refuses pictures over `MAX_PIXELS` from the header alone.
|