Skip to content
Memory corruption Disclosed report Advanced

Double-free NSS Crash in [@ je_free | PL_FreeArenaPool | cert_GetCertificateEmailAddresses | CERT_DecodeDERCertificate | stan_GetCERTCertificate]

A double-free crash occurs in NSS when processing a certificate, likely due to a memory management error in the certificate decoding path. An attacker could potentially trigger this crash by supplying a crafted certificate, leading to a denial of service.

Randell Jesup Follow

Originally disclosed on Mozilla

  • Fixed in 2.4 years
  • Paid in 2.4 years
  • Disclosed after 2.4 years
Text
Double-free crash; goes back to at least 76.

Marking as security because NSS


Crash report: https://crash-stats.mozilla.org/report/index/a203b8ec-2e8e-4963-abcb-196d80211225

MOZ_CRASH Reason: '''MOZ_RELEASE_ASSERT((run->mRegionsMask[elm] & (1U << bit)) == 0) (Double-free?)'''

Top 10 frames of crashing thread:
'''
0 mozglue.dll je_free memory/build/malloc_decls.h:54
1 nss3.dll PL_FreeArenaPool nsprpub/lib/ds/plarena.c:229
2 nss3.dll cert_GetCertificateEmailAddresses security/nss/lib/certdb/alg1485.c:1483
3 nss3.dll CERT_DecodeDERCertificate security/nss/lib/certdb/certdb.c:793
4 nss3.dll stan_GetCERTCertificate security/nss/lib/pki/pki3hack.c:895
5 nss3.dll CERT_NewTempCertificate security/nss/lib/certdb/stanpcertdb.c:411
6 nss3.dll CERT_DecodeCertFromPackage security/nss/lib/pkcs7/certread.c:522
7 xul.dll nsNSSCertificate::Read security/manager/ssl/nsNSSCertificate.cpp:694
8 xul.dll nsBinaryInputStream::ReadObject xpcom/io/nsBinaryStream.cpp:940
9 xul.dll mozilla::psm::TransportSecurityInfo::Read security/manager/ssl/TransportSecurityInfo.cpp:568
'''

The original report as published on Mozilla's Bugzilla, by Randell Jesup. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a double-free in the certificate email address extraction function, where an arena pool is freed twice.

Impact

Could cause a denial of service (crash) when a crafted certificate is processed.

What the attacker needed

Crafted certificate

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A double-free is a memory bug where the same block of memory is freed twice. This can crash the program or, in some cases, be exploited to run malicious code. Here, a certificate processing function in a security library frees memory incorrectly, causing a crash.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.