Menu

#1470 7z cannot extract part of cab archive embedded in msi package

open
CAB (1)
6
2015-01-18
2015-01-14
Eugene
No

Reproduction:
1. Download Windows 8.1 retail symbols package (x86 or x64) Link
2. Extract it using 7-zip (GUI or command-line)

Expected:
MSI's embedded SYMBOLS.cab is extracted without errors

Actual:
MSI's embedded SYMBOLS.cab is extracted partially, more than half of files did produce errors

SYMBOLS.cab is extracting fine with WinRAR (when extracted with MSI Extractor tool from http://blogs.msdn.com/b/heaths/archive/2006/04/07/571138.aspx)

Discussion

  • Igor Pavlov

    Igor Pavlov - 2015-01-15

    What exact file to download?
    Please suggest smallest file as possible.

     
    • Eugene

      Eugene - 2015-01-15

      There are no small packages unfortunately and I've encountered this behavior only on these packages
      Here are x86 and x64 symbols.

      x86 package is a little smaller

       

      Last edit: Eugene 2015-01-15
      • Igor Pavlov

        Igor Pavlov - 2015-01-15

        OK.
        I use x86 file
        Windows_winblue.9600.16384.130821-1623.x86fre.Symbols-IRM_SYM_X86FRE_EN-US_MSI.msi
        I unpack SYMBOLS.cab file with 9.38 (open MSI level only)
        7-Zip / open Archive / *
        WinRAR 5.20 also shows message for that file: Next volume is required.
        7-Zip shows error for file _0002127.

        That archive doesn't follow specification.

        There is structure in CAB file:

        struct CFFOLDER
        {
            u4  coffCabStart;   /* offset of the first CFDATA block in this folder */
            u2  cCFData;    /* number of CFDATA blocks in this folder */
            u2  typeCompress;   /* compression type indicator */
            u1  abReserve[];    /* (optional) per-folder reserved area */
        };
        

        cCFData is 16-bit. But that cab file contains more blocks than 16-bit can represent. So only low 16-bits of value were stored. That is why 7-Zip and WinRAR stop decoding.

        Maybe some cab unpackers do not check that field.
        I'll think about problem more.

         
  • Eugene

    Eugene - 2015-01-16

    Strange, I've rechecked extracting of symbols.cab on winrar 5.10 and winrar 5.20 (both x64) and each version extracted symbols.cab fine.

     

    Last edit: Eugene 2015-01-16
  • Igor Pavlov

    Igor Pavlov - 2015-01-16

    Maybe rar uses some system API to extract from CAB?
    So different code works in different systems?

    CRC32 for my SYMBOLS.cab:
    Size: 656923406 bytes (626 MB)
    CRC32: 4A7FAFD9

    do you check same file?

     
  • Eugene

    Eugene - 2015-01-17

    I will check this on few other systems, I have checked on Windows 8.1 Pro x64.

    Regarding symbols.cab, the hash is the same

     

    Last edit: Eugene 2015-01-17
  • Eugene

    Eugene - 2015-01-17

    Igor, you're right about WinRAR and system API for CAB extracting, on Windows XP RAR asked me about next volume while on Win7 and later it did not asked anything (regardless how old version i've used)

     

Log in to post a comment.