sharanggupta opened a new pull request, #570:
URL: https://github.com/apache/commons-imaging/pull/570

   `JpegDecoder` guards the output raster with `Allocator.check(Integer.BYTES * 
width * height)`, but that product is computed in `int` and overflows for large 
SOF dimensions (e.g. 0x8000 x 0x8000 wraps to 0), so the guard passes and 
`Raster.createPackedRaster` then allocates from the raw dimensions: an 
uncontrolled multi-gigabyte allocation from a tiny crafted JPEG. This computes 
the request in `long` and uses the existing overflow-safe two-argument 
`Allocator.check` overload. Adds a `JpegDecoderTest` case that fails without 
the change.
   
   Reported privately to the ASF security team, who confirmed the analysis and 
pointed to IMAGING-379 as the right home for this hardening (resource 
exhaustion is out of scope as a security report), suggesting this public 
contribution.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to