-
Notifications
You must be signed in to change notification settings - Fork 733
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
'quic::HeaderProtectionKey::new_mask' behaves differently depending on the version of ring #2445
Comments
The documentation says:
[EDIT: Removed incorrect comment.] |
Thanks for answering. I still do not understand why I have gotten an error. In particular, I am not getting why ChaCha20 works and AES256 does not, while their key lengths are identical. And one more aspect I would like to be clarified is why then quic tests are using 16 as the PS: I am not proficient in the crypto algorithms, but would like to read about them if it would be needed to resolve the error/my misunderstanding. |
In all algorithms we currently support, the sample length is 16 bytes. I have clarified the test in #2446. PTAL. In any case, I don't think it is useful to compare 0.16.20. Nobody should be using 0.16.20 any longer. |
Thanks for clarification.
Yeah, I agree on that one. I am just getting some code up to speed.
Could you please help me with this one? I just do not understand whether this is my problem and how I can fix/help to fix the issue if there is any. |
It has always been documented, even in 0.16.x, that the argument of I see that the implementation of So, it is possible that in earlier versions passing in the wrong length might have different results than you are expecting. I believe the newest version of the code is doing the best thing. WDYT? |
I added tests for the key length checking in PR #2446 too. |
I see I misread your fuzz test earlier. I updated my earlier comment. Could you share specific test vectors that were generated, for which the test seems to fail? |
Also, could you share the hardware target you are testing on? |
I figured out the problem. See this test vector:
I will update the code and do a release. |
It looks like the problem only occurs when |
Thanks or reporting this. I believe it is fixed in PR #2447. In the future, it would be great if you could use the security vulnerability reporting tool for things like this. |
Yeah, this is the exact problem, accordingly to logs from the fuzzing. Let me know, whether you need th logs and the generated slices.
Sure, I will use it in the future. I did not knew this was the security issue. |
I have checked the test and the issue is fixed. Thanks for your time and work! |
Hi there!
During the fuzzing of a project I'm working on, I encountered a crash that led me here.
The function
quic::HeaderProtectionKey::new_mask
is returning an error when it shouldn't. As I understand it,new_mask
should work fine when the input data is 16 bytes long. This issue is reproducible starting from version 0.17.1, but everything works fine in version 0.16.20.Is this intended behavior?
One more note:
quic::CHACHA20
works fine regardless of the version. So the problem is in theAES_128
andAES_256
.I've created a sample fuzz target:
Thank you in advance for your time.
The text was updated successfully, but these errors were encountered: