CERT_DecodeCertPackage() crash with empty pkcs7 sequence
Categories
(NSS :: Libraries, defect, P1)
Tracking
(firefox-esr9196+ fixed, firefox94 wontfix, firefox95 wontfix, firefox96+ fixed)
People
(Reporter: taviso, Assigned: jschanck)
Details
(Keywords: csectype-dos, sec-low, Whiteboard: [nss-fx](worse for server consumers of NSS, where availability is a more important security trait) [post-critsmash-triage] [adv-main96+][adv-ESR91.5+])
Attachments
(3 files)
This is similar to bug 1533216, I found another case where CERT_DecodeCertPackage()
can fail. As far as I know, this can crash any client or server that accepts untrusted certificates because this is the standard entrypoint for getting a CERT object from some data read off the wire.
I'm surprised this wasn't caught by fuzzing, but if you put an indefinite sequence containing just a pkcs7 signedData OID, followed by a NULL or EOC or something similar, SEC_ReadPKCS7Certs()
will dump core.
$ certutil -d "." -A -n test -t "p,p,p" -i nss-empty-pkcs7.der
Segmentation fault
![]() |
||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Updated•3 years ago
|
Comment 2•3 years ago
|
||
The severity field is not set for this bug.
:beurdouche, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•3 years ago
|
Comment 3•3 years ago
|
||
Updating the Firefox status fields: It looks like this was included in NSS 3.68.1 so it'll be fixed in Firefox ESR91.4. Also fixed in NSS 3.73 which means Firefox release 96 will be the fixed one.
Comment 4•3 years ago
|
||
Technically these won't be checked in until tomorrow. I'll reopen until we have a commit link to add to the bug
Comment 5•3 years ago
|
||
We're also not planning to respin the Firefox 91.4.0esr build for NSS 3.68.1, just TB 91.4.0.
Comment 6•3 years ago
|
||
https://hg.mozilla.org/projects/nss/rev/7ff99e71f3e37faed12bc3cc90a3eed27e3418d0 (default)
https://hg.mozilla.org/projects/nss/rev/5b2659c39cc7c22f2e403e90fc75189cd5023310 (3.68.1)
https://hg.mozilla.org/projects/nss/rev/2adbe73d88e016b6604e1014731d8c22d6e58005 (3.73)
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 7•3 years ago
|
||
Are we sure this here was really just a crash?
Assignee | ||
Comment 8•3 years ago
|
||
I think so. It's a null pointer dereference where we explicitly initialize the pointer to NULL. I don't see a way to trigger anything more severe---like dereferencing an uninitialized pointer or an attacker controlled pointer.
Updated•3 years ago
|
Updated•3 years ago
|
Description
•