-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Load dependencies by name #1594
base: master
Are you sure you want to change the base?
Conversation
DYNAMIC_LINK_WARNING( dl_sig_other_error, filepath, retval); | ||
break; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar here: Is the case for an expired certificate covered somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is covered by untrusted root case as the whole chain of certificates is checked.
3872b7b
to
4605226
Compare
src/tbb/dynamic_link.cpp
Outdated
pWVTData.dwProvFlags = WTD_CACHE_ONLY_URL_RETRIEVAL | WTD_REVOCATION_CHECK_CHAIN; | ||
pWVTData.dwUIContext = WTD_UICONTEXT_EXECUTE; // UI Context to run the file | ||
|
||
const auto rc = WinVerifyTrust((HWND)INVALID_HANDLE_VALUE, &pgActionID, &pWVTData); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to use LONG instead of auto to prevent ambiguity and unintended typecasting when doing comparisons later with the return code from WinVerifyTrust
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the security standpoint, this is good for now.
A few notes:
- This is still up for discussion but anything beside ERROR_SUCCESS from WinVerifyTrust should result in an error instead of a warning sometimes. The user always has to option to turn off signature verification if they want, so once it's on, it's either success or failure.
- Might also need review from the TBB team.
- If there are some testing results that we can share, that will be great.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update to use SearchPathA is good from the security point of view.
Signed-off-by: Fedotov, Aleksei <[email protected]>
Signed-off-by: Fedotov, Aleksei <[email protected]>
Signed-off-by: Fedotov, Aleksei <[email protected]>
Signed-off-by: Fedotov, Aleksei <[email protected]>
Signed-off-by: Fedotov, Aleksei <[email protected]>
Signed-off-by: Fedotov, Aleksei <[email protected]>
dd5a544
to
5e6c672
Compare
Thanks, @egfefey! Then I proceed with productization of this patch. |
Description
This PR allows loading dependencies by module name only as it is proposed in this RFC. In particular, it:
The signature verification is enabled by default. To disable it explicitly, user needs specifying
-DTBB_VERIFY_DEPENDENCY_SIGNATURE=OFF
in the invocation command of CMake. In this case the warning message appears:The patch also adds optional reporting of dynamic link issues. Examples of the output:
The issues reporting is disabled by default and can be enabled by setting
TBB_DYNAMIC_LINK_WARNING
macro during the build.