Closed retpoline closed 2 years ago
The second crash occurs due to invalid JSON. It's truncated on "ty" token. Here's a minimal sample that leads to the same crash: {"layers":[{"shapes":[{"ty":0}]}]}
. I've added a null pointer check.
For the first one, I've added a vector border check. So rLottie can parse this JSON and render something.
Great, thanks for the quick fixes!
Hi team,
Some crashes were found while fuzz testing of the lottie2gif binary which can be triggered via malformed JSON files. Although these malformed files only crash the program, they could potentially be crafted further into security issues where these kinds of JSON files would be able compromise the process's memory through memory corruption, so hardening the code to prevent these kinds of bugs would be great to mitigate such issues.
See details below for repros and debug information.
crash-1.json
Debug info
crash-2.json
Debug info