You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bound JSON nesting before recursive metadata parsing exhausts the stack #540
parse_value recursively calls parse_array/parse_object, which recursively parse their elements without tracking a depth limit. Nested metadata can therefore consume call stack proportional to input nesting rather than returning a bounded parse error. The compiler uses this parser for the std manifest, so malformed or extreme input should remain an ordinary diagnostic.
No stack-overflow reproducer was run in this audit.
Enforce a deliberate nesting bound before recursive descent, or use an iterative parser with bounded resource handling.
Cover arrays, objects and alternating nesting immediately below/at/above the chosen limit.
Return an error instead of a panic or process abort; include a subprocess test for very deep input where appropriate.
Ensure accepted trees can also be safely serialized/dropped and keep the parser dependency-free.
Related: #351 addresses string decoding, not recursion/resource limits.
Audit status: identified by static source inspection; the scenarios above have not been executed during this audit. The permalink fixes the reviewed revision; this report does not claim the defect was introduced by #520.
Activity
fix: bound JSON nesting depth to prevent stack overflow (wavefnd#540)
fix: bound JSON nesting depth to prevent stack overflow (wavefnd#540)
fix: bound JSON nesting depth to prevent stack overflow (#540) (#546)