Skip to content
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 off-by-one in CBC de-/encrypt; don't touch input buffer during CBC encryption #18

Closed
wants to merge 3 commits into from

Conversation

andreas-wehrmann
Copy link

CBC_encrypt()/CBC_decrypt() wouldn't behave properly if the length was not a multiple of KEYLEN.
Also the input buffer is not modified inplace during CBC_encrypt().

andreas-wehrmann and others added 3 commits March 30, 2015 10:11
Just remove a useless block copy

This undefined behavior has been found during a formal audit by the means of TrustInSoft Analyzer.
fix buffer overflow when input length less than block size
@kokke
Copy link
Owner

kokke commented Nov 9, 2015

Hi Andreas,

This is by design. I have omitted checking for valid input, I should have stated that in comments.
I am looking into your code for the improvements you have made.

I will look closer into this.

@kokke
Copy link
Owner

kokke commented Nov 10, 2015

Oh, glancing over it again, I see not all of it is by design... Sorry for the arrogant answer :/ I'll have a look at fixing this

@andreas-wehrmann
Copy link
Author

No worries; I don't see anything arrogant there btw.

@kokke
Copy link
Owner

kokke commented Nov 21, 2017

@andreas-wehrmann Is this pull request still relevant? I think the bugs may have been fixed.

@andreas-wehrmann
Copy link
Author

andreas-wehrmann commented Nov 21, 2017 via email

@kokke
Copy link
Owner

kokke commented Nov 22, 2017

Hi @andreas-wehrmann I was just checking up after some of the latest updates.

I think the padding issues are gone and now the input buffer is leaved untouched as well.

@kokke
Copy link
Owner

kokke commented Dec 6, 2017

Closing because issue is fixed after merging #76

@kokke kokke closed this Dec 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants