Closed mcb30 closed 1 year ago
@mtrojnar Thanks for merging so quickly! I need to update the documentation at https://ipxe.org/appnote/etoken to state that osslsigncode
version 2.6 cannot be used due to this bug. Is there an expected release date for version 2.7?
version 2.6 cannot be used
You mean "cannot be used with cab files", right? It's not necessarily the most popular of the supported file formats.
Is there an expected release date for version 2.7?
End of September.
version 2.6 cannot be used
You mean "cannot be used with cab files", right? It's not necessarily the most popular of the supported file formats.
Sorry, I should have been more specific. I meant "cannot be used for signing UEFI Secure Boot submissions" (which have to be submitted as signed .cab files).
Is there an expected release date for version 2.7?
End of September.
That's great, thanks!
osslsigncode sign
will currently generate an invalid.cab
file. This can be observed by using e.g.:With current master (commit 1fc2c937f25508bba5b8040640502e9342a56d4d) this will produce output such as:
rather than the expected
Bisection reveals that the first failing commit is 0f51a06b8f4a99bf9dad785d7f26c75daf5234e3, which performed a substantial amount of refactoring.
Inspection of the output
.cab
files shows that the first suspicious value is within theCFFOLDER.coffCabStart
field. Manually editing the value in this field results in a.cab
file that passes thecabextract --test
checks (although obviously with an invalid signature, since the content has been edited after signing).Comparison of
cab_add_header()
before and after commit 0f51a06b8f4a99bf9dad785d7f26c75daf5234e3 shows that one line of code seems to have been accidentally deleted instead of updated:Note that there is no replacement for the line:
This results in the variable
tmp
effectively containing uninitialised data. (This is not picked up as a compiler error, since the variabletmp
is also used earlier in the same function.)Adding in the expected change:
results in a valid
.cab
file that is accepted bycabextract --test
(and is byte-for-byte identical to that produced using the commit immediately prior to the commit 0f51a06b8f4a99bf9dad785d7f26c75daf5234e3 that introduced the bug).