Menu

#60 zip bomb and bzip2 compression

v1.0 (example)
open
nobody
None
5
2021-12-28
2019-09-30
No

I see that Mark Adler has addressed the zip bomb issue in https://github.com/madler/unzip, and not that Debian have foled these changes into their unzip (see here).

When testing Mark's fixed unzip with some zip files that use bzip2 compression, I notice that quite often I get the error "not enough memory for bomb detection".

Here is an example

$ zip -Z bzip2 lorem.zip lorem 
  adding: lorem (bzipped 31%)

$ ./unzip -t lorem.zip 
Archive:  lorem.zip
    testing: lorem                    OK
error: not enough memory for bomb detection
At least one error was detected in lorem.zip.

I've built unzip with the latest bzip2 sources (https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz).

Not sure if this is an issue with bzip2 or unzip.

Has anyone else noticed this?

2 Attachments

Discussion

  • Steven Schweda

    Steven Schweda - 2021-12-28

    I see that Mark Adler has addressed the zip bomb issue [...]

    That code is incompatible with the LZMA and PPMd code in the current
    development code, and it seems to have trouble with bzip2, too.

    Adding this feature to UnZip (for all supported compression and
    encryption schemes) is the current task, but I haven't had much time to
    devote to it recently. Some progress is possible, however.

    I would like an official organization and repository by product too,
    to have a better development and contributions.

    That might be nice.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.