-
Notifications
You must be signed in to change notification settings - Fork 33
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
Different result from Signtool #102
Comments
We've had some bugs in the past around uthenticode's section/data hashing, producing false negatives where other implementations (like If you have the ability, I suggest stepping through uthenticode/src/uthenticode.cpp Lines 193 to 288 in cad1bfc
If not, I can attempt to debug this in a few days. |
Thanks for the recommendation. After stepping through Possible
Currently, uthenticode returns false if it doesn't contain From my understanding, |
Thanks for debugging that! Hmm -- I don't think we can unconditionally widen this to That being said, I think I see the underlying problem here: it looks like To do that, I think uthenticode needs to do one of two things:
(1) is preferred since it's strictly more correct from a path validation perspective, but (2) might be easier. TL;DR: You've hit a bug in uthenticode, but unfortunately I think the patch in #103 is too broad -- we'll need to approach this in a way that doesn't involve uthenticode handling any EKUs besides |
@woodruffw, is this issue planned to be fixed in a short time?
Can you provide more details about the two methods? |
I don't have an immediate timeline for fixing it myself. If someone sends a functional patch (with tests) that doesn't regress the correctness of our other EKU checks, then I'll do my best to review and merge it in a timely manner.
Option (1) basically means someone needs to go through OpenSSL's APIs and figure out how to tell it to constrain the EKU during validation, rather than the pre-check we currently do. Option (2) basically means that we should move the current EKU check from before validation to after it. This is less correct from a chain building perspective, but it's a lot simpler than (1). |
nc.exe from int0x33/nc.exe is signed and it is verified by signtool.
But it is not verified by uthenticode.
Some other software has the same problem, while some of them are normal. I understand there are caveats that uthenticode may behave differently to Wintrust API because of not accessing Trusted Publishers store which causes the uthenticode-verified software can't run on some Windows environments. But this situation is that the signature can't be cryptographically verified, which I have no idea why it would happen.
The following are the versions of the dependencies I used:
The text was updated successfully, but these errors were encountered: