[issue6434] buffer overflow in Zipfile when wrinting more than 2gig file
Miguel Hernández Martos enla...@gmail.com added the comment: I think it's a dup of http://bugs.python.org/issue9720 That issue has a patch that allows the generation of zip files with 2GB files. -- nosy: +enlavin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6434 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6434] buffer overflow in Zipfile when wrinting more than 2gig file
Nadeem Vawda nadeem.va...@gmail.com added the comment: Marking as duplicate. -- resolution: - duplicate stage: needs patch - committed/rejected status: open - closed superseder: - zipfile writes incorrect local file header for large files in zip64 type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6434 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6434] buffer overflow in Zipfile when wrinting more than 2gig file
Paul paul.bauer.spearst...@gmail.com added the comment: This is a problem with python2.7 as well. A change in struct between python2.6 and 2.7 raises an exception on overflow instead of silently allowing it. This prevents zipping any file larger than 4.5G. This exception concurs when writing the 32-bit headers (which are not used on large files anyway) The patch should be simple. Just wrap line 1100: ...struct.pack(LLL,... with a try: except: to revert to the old behavior. Alternatively, check if size is bigger than ZIP64_LIMIT and set to anything less than ZIP64_LIMIT. -- nosy: +Paul versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6434 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6434] buffer overflow in Zipfile when wrinting more than 2gig file
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6434 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6434] buffer overflow in Zipfile when wrinting more than 2gig file
Changes by Antoine Pitrou pit...@free.fr: -- versions: +Python 3.2, Python 3.3 -Python 2.4, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6434 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6434] buffer overflow in Zipfile when wrinting more than 2gig file
Paul paul.bauer.spearst...@gmail.com added the comment: I attempted to re-allow overflow in the struct(...) call by replacing `zinfo.file_size` with `ZIP64_LIMIT % zinfo.file_size` in zipfile.py, and successfully produced a compressed file from a 10G file, but the resulting compressed file could not be uncompressed and was deemed invalid by any unzip util I tried. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6434 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6434] buffer overflow in Zipfile when wrinting more than 2gig file
Chris Lambacher ch...@kateandchris.net added the comment: This should be closed as a dup of #1182788 which the OP identified as being the same bug and which is now fixed due to the implementation. of ZIP64. -- nosy: +lambacck ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6434 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6434] buffer overflow in Zipfile when wrinting more than 2gig file
segfault42 brice.na...@free.fr added the comment: still no one to help on this problem ? is someone has some idea ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6434 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6434] buffer overflow in Zipfile when wrinting more than 2gig file
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I did reproduce the problem, but I'm sorry I don't have the time to fix it. However, I will review any proposed patch. -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6434 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6434] buffer overflow in Zipfile when wrinting more than 2gig file
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I don't see how it can be a buffer overflow. Or is it an exception raised by the struct.pack function? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6434 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6434] buffer overflow in Zipfile when wrinting more than 2gig file
segfault42 brice.na...@free.fr added the comment: yes it's zinfo.file_size which is bigger than the long specify in the struct.pack There's must have a solution with the extra header because a lot of tools can zip big file and these zip file can be open by zipfile.py it's easy to reproduice with a big file of 3 gig. i think that the problem come from that the write methode do not take care of the flag allowZip64 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6434 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6434] buffer overflow in Zipfile when wrinting more than 2gig file
New submission from segfault42 brice.na...@free.fr: Hello, I have a problem with the librairy zipfile.py http://svn.python.org/view/python/trunk/Lib/zipfile.py?revision=73565view=markup Zinfo structure limit the size of a file to an int max value with the ZIP64_LIMIT value ( equal to (1 31) - 1 so to 2147483647 . The problem is happening when you write a big file in the line 1095 : self.fp.write(struct.pack(lLL, zinfo.CRC, zinfo.compress_size, zinfo.file_size)) zinfo.file_size is limited to a int size and if you have a file bigger than ZIP64_LIMIT you make a buffer overflow even if you set the flag allowZip64 to true. -- components: Library (Lib) files: zipfile.py messages: 90242 nosy: segfault42 severity: normal status: open title: buffer overflow in Zipfile when wrinting more than 2gig file versions: Python 2.4, Python 3.0 Added file: http://bugs.python.org/file14469/zipfile.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6434 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6434] buffer overflow in Zipfile when wrinting more than 2gig file
segfault42 brice.na...@free.fr added the comment: look like issue 1182788 -- type: - crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6434 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com