-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Introduction of timing attack safe bcmp implementation. #4729
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
Conversation
49969b0
to
b7106eb
Compare
6e5ef96
to
78a51c1
Compare
Would it make sense to add the length check (both strings must have same length) to Anyway, could you please resolve the merge conflicts? |
Sure I can give it a try |
757af67
to
955eaee
Compare
This looks reasonable to me (not sure about adding a new file for that). More review welcome! |
What's the status of this PR? Still waiting for review? Can we get this into master for 8.2? |
ping :-) |
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.
LGTM other than the nits
@@ -179,6 +179,10 @@ END_EXTERN_C() | |||
#define explicit_bzero php_explicit_bzero | |||
#endif | |||
|
|||
BEGIN_EXTERN_C() | |||
PHPAPI int php_safe_bcmp(const zend_string *a, const zend_string *b); |
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.
maybe add a comment either here to indicate that -1
is if the strings do not have the same lengths, 0
if they match and 1
if they are not equal?
Nothing new but to refactor usage b/w hash and password extensions but using volatile pointers to be a bit safer, allowing to expand its usage eventually.
e79fb0e
to
a76882b
Compare
Closed by bfe6f9e66 |
Nothing new but to refactor usage b/w hash and password
extensions but using volatile pointers to be a bit safer,
allowing to expand its usage eventually.