-
-
Notifications
You must be signed in to change notification settings - Fork 11k
Fix some bugs with the cfb1 bitsize handling #5426
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
Fix some bugs with the cfb1 bitsize handling #5426
Conversation
|
This looks like something that could use test cases. |
|
This is difficult to test because the failing code path is only entered when the input length for AES / camellia we have: |
|
However, I think EVP_MAXCHUNK is too high if shifted up by 3 bits it will overflow..... |
|
Disregard the last comment, the chunk size is shifted down by 3 bits. |
|
So on a 32-bit target encrypting more than 2^27 bytes = 128 MB is bound to fail. |
| ((cbits == 1) \ | ||
| && !EVP_CIPHER_CTX_test_flags(ctx, EVP_CIPH_FLAG_LENGTH_BITS) \ | ||
| ? inl*8 : inl), \ | ||
| ? chunk*8 : chunk), \ |
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.
Hmmm... Originally it was chunk...
|
2^28, right? It's unreasonable to mount such test. So I'd say it's ready as is. [Just in case, since it was mentioned, in case one wonders that is. What's EVP_MAXCHUNK and why does it look the way it does. It's there to reconcile the fact that EVP accepts len as size_t, while some of lower level subroutines as [signed] long :-(] |
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from #5426)
|
Merged to master and 1.1.0 so far. |
No description provided.