3 ms·
I forgot another major JSON minefield problem which is not mentioned nor tested here: stackoverflow. This is in fact the most important problem to test against
by rurban 7y ago
I forgot another major JSON minefield problem which is not mentioned nor tested here: stackoverflow.
This is in fact the most important problem to test against, because it might lead to exploitable stack ROP.
JSON is usually parsed recursively, and deeply nested structures are mostly not depth counted. One can trivially construct a nested array or map of 500 to 30000 elements, and at one point the parser either fails or crashes with an overflow. This number is fixed, thus trivially exploitable. The test spec should contain the max. depth for arrays and maps, and if there's a fixed builtin limit, a compile-time limit, implicit limit by crash, or none.
non recursive parsers are fine.