-
-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSCabinet file is corrupt: cabinet reserved area size is 6144 instead of 20- NoRetry #172
Comments
Thank you for reporting this issue
Jsign assumes the reserved area is either empty or contains a 20 bytes signature structure. If there is something else in the reserved area, signing the file will erase it. The question is, how does signtool handle such a file? Is the 6K reserved area ignored and replaced by a 20 bytes signature? Is the 6K reserved area preserved but overwritten on the first 20 bytes ? Or does it trigger an error? |
Hi , Thanks for the reply |
It looks like signtool replaces the empty reserved area with the CABSignature structure and appends the PKCS#7 signature at the end of the file. If the reserved area is not empty, different things may happen:
It seems that the bytes of the reserved area are interpreted as follow:
|
Good sleuthing :-) . |
I don't have an ETA sorry. I've discovered another problem related to the per folder reserved area (using the
|
Good morning .
I have a fair few of these old cabs that contain a reserved section of 6144 bytes.
I believe they were created with a ddf containing set reservepercabinetsize=6144.
Looking at the cab signing class , there seems to be code to handle a fixed size of 20 , but nothing more general . The reserved bytes could be any value .
Is this an oversight / bug , or expected behaviour . I looked at the cab documentation and could not find anything describing specific reserve sizes .
I tried working around this by allowing 6144 as well as 20 , but something deeper gets messed up .
Any ideas how this can be resolved in the library ?
To duplicate, create a simple cab with makecab and a ddf containing set reservepercabinetsize=6144 .
Many thanks
John
The text was updated successfully, but these errors were encountered: