certificate viewer doesn't handle keyUsage extensions that are unexpectedly long
Categories
(Firefox :: Security, defect)
Tracking
()
People
(Reporter: 2295456556, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(10 files)
|
53.09 KB,
application/x-zip-compressed
|
Details | |
|
1.66 KB,
application/x-x509-ca-cert
|
Details | |
|
2.34 KB,
application/octet-stream
|
Details | |
|
1.69 KB,
application/octet-stream
|
Details | |
|
18.85 KB,
image/png
|
Details | |
|
4.25 KB,
image/png
|
Details | |
|
4.44 KB,
image/png
|
Details | |
|
22.27 KB,
image/png
|
Details | |
|
51.86 KB,
image/png
|
Details | |
|
297.99 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Edg/116.0.1938.69
Steps to reproduce:
1.In Firefox, visit the url about:certificate?cert=(processed pem data) containing the certificate information.
2.Use Python to create a local server (e.g. using Flask) and specify a mutated certificate and private key. Access the Flask provided url in Chrome.
3.In your own developers' way, let the browser parse mutated certificate files, then observe the results.
Actual results:
Description: We tested with a mutated digital certificate as a test case. We have discovered differences in the parsing results of the certificate key usage extension for mutated digital certificates between Google Chrome and Mozilla Firefox browsers.
OS: Windows 10 22H2 19045.2604
Supplement: The mutated certificate is from this URL:'https://www.csdn.net/'.And The mutation certificate did not change the parsing result of key usage in Firefox
My exception: Confirm whether the discrepancy is a bug or not.
Expected results:
I don't know which of these two different certificate key usages is correct, but I want both browsers to have the same interpretation of the digital certificate. So I need you to confirm whether this difference is a bug or not.
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Security: PSM' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•2 years ago
|
||
Can you just post the certificate in question? I'm not opening that zip file.
| Reporter | ||
Comment 3•2 years ago
|
||
| Reporter | ||
Comment 4•2 years ago
|
||
| Reporter | ||
Comment 5•2 years ago
|
||
| Reporter | ||
Comment 6•2 years ago
|
||
| Reporter | ||
Comment 7•2 years ago
|
||
| Reporter | ||
Comment 8•2 years ago
|
||
| Reporter | ||
Comment 9•2 years ago
|
||
Comment 10•2 years ago
|
||
Thanks!
This is a bug in how Firefox displays some keyUsage extensions, but it doesn't affect certificate validation.
Updated•2 years ago
|
Comment 11•2 years ago
|
||
Dana, since you worked on this issue can I mark it as new for further investigations? Thank you.
Comment 12•2 years ago
|
||
Sure.
| Reporter | ||
Comment 13•2 years ago
|
||
Dear [Developer],
As you may know, my team has been testing browser certificate parsing correctness to uncover potential security vulnerabilities. Relevant research such as the SBDT paper (https://dl.acm.org/doi/10.1145/3597926.3598110) has shown parsing errors can lead to security issues, as not all problems manifest in certificate validation - certificates may fail earlier in parsing.
I understand you have categorized the issues we found as "display bugs" in the certificate viewer. However, we have reason to believe the viewer reflects the internal state of the parser. In other words, if the viewer shows incorrect data, it indicates the parser erred when initially parsing certificates. Hence these could still be security issues.
If the certificate viewer does indeed not accurately reflect parser internals, would it be possible to add interfaces for direct access to raw parser output? This would allow us to further investigate. Or might you know of any methods to directly obtain certificate parsing results from the parser itself? That would help improve our methodology and avoid over-relying on the certificate viewer.
Thanks again for your help!
Comment 14•2 years ago
|
||
Like I said in bug 1867580, the parser implementation behind the certificate viewer in Firefox is PKIjs. The code for it is available at https://github.com/PeculiarVentures/PKI.js. You should file the bug you've been filing here at https://github.com/PeculiarVentures/PKI.js/issues.
Comment 15•4 months ago
|
||
Seems like this no longer happens in Firefox 143.0.1 (64-bit). Tested with the mutated_keyuse_diff.pem file with firefox certificate viewer and openssl 3.2.4, both display the same keyUsage.
Comment 16•4 months ago
|
||
Comment 17•4 months ago
|
||
Description
•