GHSL-2022-049: Stack exhaustion in jsonxx - CVE-2022-23460
A crafted JSON file causes stack exhaustion when parsed by the jsonxx library, leading to a crash. An attacker could use this to cause a denial of service in programs that use the library.
The attached repro.json file causes stack overflow in ASAN build of jsonxx when passed to Object::parse
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 report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the JSON parser uses recursion without a depth limit, so deeply nested input exhausts the call stack.
Impact
This issue may lead to Denial of Service of the program using the library.
What the attacker needed
Attacker can supply a JSON file; program uses jsonxx to parse it
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 library that reads JSON data can be tricked by a specially crafted file into using too much memory on the stack, which is where the program keeps track of function calls. This makes the program crash, so anyone who can supply such a file can stop the program from working.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.