You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extracting large packages (while testing around 8GB, but I'm guessing it might have something to do with zip64 extensions, so might be anything larger than 4GB) created by rattler-build seems to be buggy. We upload these packages to our Quetz server, and we noticed it couldn't process them. When we looked further into it, it looks like we can't extract the archive neither using conda-package-handling nor with standard unzip on linux (Errors with error: invalid zip file with overlapped components (possible zip bomb)). Note that we don't seem to run into the unzip error if the package is a single file with random data, cph still fails. But with packages with multiple larger files in it, unzip fails too.
Here's a sample recipe with which we were able to reproduce errors with cph extract/list
package:
name: large_packageversion: 1requirements:
build:
build:
number: 1noarch: genericscript:
- if: unixthen: | # Write around 8GB of random data to a file in PREFIX dd if=/dev/urandom of="$PREFIX/random_data" bs=1M count=8192
Here are the different errors we run into depending on what is in the package:
For random data like in the above example recipe: cph fails with below error, but unzip works fine.
$ cph extract <package>.conda
...
<long stack trace >
...
raise BadZipFile("Bad CRC-32 for file %r" % self.name)
zipfile.BadZipFile: Bad CRC-32 for file 'info-large_package-1-hb0f4dca_1.tar.zst'
For lots of files ranging from 300MB jar files to files as small as 1 MB cph fails with below error, and unzip fails too with error: invalid zip file with overlapped components (possible zip bomb)
$ cph extract <package>.conda
...
<long stack trace >
...
File "../lib/python3.12/site-packages/conda_package_handling/streaming.py", line 38, in _stream_components
raise exceptions.InvalidArchiveError(filename, f"failed with error: {str(e)}") from e
conda_package_handling.exceptions.InvalidArchiveError: Error with archive .<path>/<package>.conda. You probably need to delete and re-download or re-create this file. Message was:
failed with error: File name in directory 'info-<package-name>-<package-version>-<build>.tar.zst' and header b'metadata.json' differ.
The text was updated successfully, but these errors were encountered:
Extracting large packages (while testing around 8GB, but I'm guessing it might have something to do with zip64 extensions, so might be anything larger than 4GB) created by rattler-build seems to be buggy. We upload these packages to our Quetz server, and we noticed it couldn't process them. When we looked further into it, it looks like we can't extract the archive neither using conda-package-handling nor with standard
unzip
on linux (Errors witherror: invalid zip file with overlapped components (possible zip bomb)
). Note that we don't seem to run into the unzip error if the package is a single file with random data,cph
still fails. But with packages with multiple larger files in it, unzip fails too.Here's a sample recipe with which we were able to reproduce errors with
cph extract/list
Here are the different errors we run into depending on what is in the package:
For random data like in the above example recipe:
cph
fails with below error, butunzip
works fine.For lots of files ranging from 300MB jar files to files as small as 1 MB
cph
fails with below error, andunzip
fails too witherror: invalid zip file with overlapped components (possible zip bomb)
The text was updated successfully, but these errors were encountered: