Analysis
NSS copies an attacker-controlled digital signature into a fixed-size buffer without bounds checking, causing memory corruption. An attacker could exploit this to overwrite function pointers and potentially execute arbitrary code.
Published on googleprojectzero.blogspot.com
This is an unusual blog post. I normally write posts to highlight some hidden attack surface or interesting complex vulnerability class.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The code copies a signature of arbitrary length into a fixed-size buffer without any bounds checking.
What the attacker needed
Ability to supply a certificate with a large signature
The fix
The vulnerability was fixed in NSS 3.73.0.
How it was found
- Generate an oversized RSA-PSS key.
- Create a self-signed certificate from that key.
- Verify the certificate with the NSS vfychain tool, causing a segmentation fault.
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 write-up has not been written yet. The Original tab links to the source.
A cryptography library used by many programs fails to check the size of a digital signature before copying it into a fixed-size memory area. This lets an attacker write past the end of that area and corrupt other data, which can crash the program or possibly let the attacker run their own code.
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.