-
Notifications
You must be signed in to change notification settings - Fork 835
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
[Bug]: Potential Regression in Parsing Invalid Certificates #7919
Comments
Hi @rumpelsepp Thank you for this excellent report! We enabled a new ASN parser component in between these versions, I am requesting a review of this behavior by the team. Thanks, |
Hi @rumpelsepp Taking a look at certificate number 2, I don't see anything in particular that is wrong with it except may be the signature. If you don't compile with --enable-ecccustcurves, the explicit curves will cause an error. The old code was totally confused by the explicit parameters. Is the configuration line above the one you used with 5.5 and 5.7? Sean |
yes, it is. |
Hi @rumpelsepp, With the configure line you specified and a test program that uses the function you gave: The explicit ECC parameters in certificates 1-16 look invalid but the ASN.1 is well formed. Go may not support explicit ECC parameters if it fails on certificate 17. Do you have further questions on this? Sean |
Hi @rumpelsepp, Did this information help you? Thanks, |
CC
@peckto
Version
bd15538
Description
Hi! I am opening this issue to share an conspicuousness I found during my research work. We did some tests with a lot of publicly available X.509 certificates, see our paper here. After evaluating the data, we came up with a difference in parsing between wolfssl 5.5 und 5.7 (see Table 6c in the paper).
Recently, I was finally able to bisect the issue to commit bd15538. Before this commit, the certificates in the attachement could not be parsed using
wolfSSL_X509_d2i()
. After this commit 14 out of 17 can be parsed by wolfssl. I am not sure which case is the most correct one. However, Go fails to parse all these certificates with an "x509: invalid ECDSA parameter" error;zlint
is not able to parse them, too. Assuming that Go's behaviour is correct, then this could be a wolfssl regression. If wolfssl parses correctly, it's a Go bug.I would be thankful if you could shed some light on this.
wolfssl-5.5.4-certs-parsed.txt
Reproduction steps
My relevant C snippet is as follows; I omitted the wrapping code of my test tool.
Relevant log output
The text was updated successfully, but these errors were encountered: