-
Notifications
You must be signed in to change notification settings - Fork 465
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
pkcs_1_pss_decode.c #638
Comments
Hi, you're right, Removing the verification that Looking at the calling code and the TLS RFC I suspect that the salt length is wrong. Here's a potential patch 0001-Fix-length-of-the-salt.patch.txt which could probably solve the issue, but I couldn't get Please get this sorted out with @eduardsui |
Hey, I fixed these lines now. It doesn't fail anymore in the check for DB == 0x00, but it fails here:
i am not sure if this is a problem of the TLS code or of the pkcs_1_pss_decode method. I would be very happy if you could help me here again. @eduardsui is not answering since months. |
I found the solution btw. Thank you anyways. If you are interested for the solution, look at |
I encountered a problem in pkcs_1_pss_decode. It's located at src/pk/pkcs1/pkcs_1_pss_decode.c
While doing some changes for a TLS project I used eduardsui/tlse (from Github) and found a problem in parsing the certificate verify packet. eduardsui used this library for calculating values and to verify data from TLS packets. The parse method used your pkcs_1_pss_decode. Inside this method it fails in the following part:
for (x = 0; x < modulus_len - saltlen - hLen - 2; x++) {
if (DB[x] != 0x00) {
err = CRYPT_INVALID_PACKET;
goto LBL_ERR;
}
}
and returns the error CRYPT_INVALID_PACKET. I am not sure exactly where the problem is, but I found out, that salt is allocated inside this method, but never used. There are just some comments, where salt is mentioned, but there is no usage. Could this be the problem? And if not, can you just remove these lines, where salt is allocated, set free and the memory set to zero?
Thanks in advance.
F. T.
The text was updated successfully, but these errors were encountered: