[Bug 2051952] [NEW] unzip rejects Microsoft OneDrive zip files

Launchpad Bug Tracker 2051952 at bugs.launchpad.net
Tue Feb 6 13:30:29 UTC 2024


You have been subscribed to a public bug by Marc Deslauriers (mdeslaur):

[Impact]
unzip rejects Microsoft OneDrive zip files. See the detailed explanation here:

https://www.bitsgalore.org/2020/03/11/does-microsoft-onedrive-export-
large-ZIP-files-that-are-corrupt

tl;dr;
Microsoft mishandles the "Total number of disks" field when using the ZIP64 extension. It should start at 1, they use 0, which isn't a valid value. Unzip doesn't properly handle the invalid value.

[Test Plan]
- Download the test zip file from comment #1.
- unzip should extract it without issue (it contains a test.txt text file)
- if unzip fails, it will spew out a weird error message like the following:

$ unzip test.zip
Archive:  test.zip
error [test.zip]:  missing 4294967098 bytes in zipfile
  (attempting to process anyway)
error [test.zip]:  start of central directory not found;
  zipfile corrupt.
  (please check that you have transferred or created the zipfile in the
  appropriate BINARY mode and that you have compiled UnZip properly)

[Where problems could occur]
This simple patch just accepts 0 as a valid total number of disks. I suppose if it was wrong it would mishandle multi-disk archives, though multi-disk archives should have a good value in that field.

** Affects: unzip (Ubuntu)
     Importance: Undecided
     Assignee: Marc Deslauriers (mdeslaur)
         Status: Fix Committed

** Affects: unzip (Ubuntu Focal)
     Importance: Undecided
     Assignee: Marc Deslauriers (mdeslaur)
         Status: New

** Affects: unzip (Ubuntu Jammy)
     Importance: Undecided
     Assignee: Marc Deslauriers (mdeslaur)
         Status: New

** Affects: unzip (Ubuntu Mantic)
     Importance: Undecided
     Assignee: Marc Deslauriers (mdeslaur)
         Status: New

** Affects: unzip (Ubuntu Noble)
     Importance: Undecided
     Assignee: Marc Deslauriers (mdeslaur)
         Status: Fix Committed

-- 
unzip rejects Microsoft OneDrive zip files
https://bugs.launchpad.net/bugs/2051952
You received this bug notification because you are a member of Ubuntu Sponsors, which is subscribed to the bug report.



More information about the Ubuntu-sponsors mailing list