Skip to content

[BUG][Low]- Unbounded program nesting can exhaust parsing or validation stacks #111

Open

Description

@arthurianresolve

Summary

Deeply nested .dsrs containers recurse through the text parser without a depth check. A serialized Program can also express a deep child chain in a flat node arena, whose validation recursively calls check_node; either lower-trust input can exhaust a host stack before returning an error. This requires a host to parse a lower-trust program. The repository's HTTP server has no artifact-upload route.

Affected code

Suggested resolution

  • Bound program depth in the text parser and serialized-program validator, or traverse graphs iteratively; return structured errors before stack exhaustion.

Acceptance criteria

  • Deeply nested seq input returns a parse error without process termination.
  • Normal nested programs still parse and validate.
  • A flat serialized node arena with a deep child chain returns a validation error without process termination.

Related issues

#102 concerns recursive class references during schema validation and rendering. This ticket concerns deep program containers and node-child chains; #67 addresses structured errors more broadly.

Validation performed

Static source review of upstream main at 72b247e2bddc7337f923461fb27b4127c7d104f3. No runtime exploit or live deployment test was performed.

Fix under review

PR #103: The PR bounds text-parser and serialized-program traversal depth.

Tracking

  • Finding ID: csf_eda938ffa8004e4a1db577ec
  • Fingerprint: codex-security/v1:sha256:051853a458f13bb86dd3a4fd1b097ea1f8b70c340413f84e86f17124e6fa8356

AI disclosure

OpenAI Codex assisted with the static source review and organization of this issue. No code change is included.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions