You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2025/10/30 12:44:32 UTC

[Bug 69867] False positive in zip bomb detection

https://bz.apache.org/bugzilla/show_bug.cgi?id=69867

--- Comment #1 from Jacobo Aragunde Pérez <ja...@igalia.com> ---
I've been investigating the issue and found a few things:

In ZipArchiveThresholdInputStream we
ZipArchiveInputStream.get[Compressed|Uncompressed]Count() methods to obtain the
sizes, then calculate the ratio.

Sizes calculated by ZipArchiveInputStream may be incorrect in some cases. Per
the API documentation: "ZipArchiveInputStream [...] may return unknown sizes
and CRC values for entries until the next entry has been reached if the archive
uses the data descriptor feature.". Reference:
https://commons.apache.org/proper/commons-compress/apidocs/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.html

ZipArchiveEntry seems to return the right sizes. I've implemented a workaround
for my code using that. I will rework that into a patch for POI.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org