Skip to content

harden: validate trace_length in verifier, remove dead bump allocator#1388

Merged
0xAndoroid merged 2 commits intomainfrom
sagar/hardening
Mar 31, 2026
Merged

harden: validate trace_length in verifier, remove dead bump allocator#1388
0xAndoroid merged 2 commits intomainfrom
sagar/hardening

Conversation

@sagar-a16z
Copy link
Copy Markdown
Contributor

  • Add is_power_of_two() and max_padded_trace_length bounds check for proof.trace_length in the verifier, mirroring the existing ram_K validation (H-001)
  • Delete jolt-platform/src/alloc.rs (dead code, never compiled — no mod declaration in lib.rs) and remove the dummy _HEAP_PTR symbol from jolt-sdk (H-002)

- Add is_power_of_two() and max_padded_trace_length bounds check for
  proof.trace_length in the verifier, mirroring the existing ram_K
  validation (H-001)
- Delete jolt-platform/src/alloc.rs (dead code, never compiled — no
  mod declaration in lib.rs) and remove the dummy _HEAP_PTR symbol
  from jolt-sdk (H-002)
- Add HEADER_MAGIC canary to AllocHeader, validated on free/realloc
- Poison magic before dealloc to prevent double-free
- Replace from_size_align_unchecked with checked alloc_layout() path
- Bad pointers in free no-op; bad pointers in realloc return null
@0xAndoroid 0xAndoroid merged commit f393fe3 into main Mar 31, 2026
20 checks passed
@sagar-a16z sagar-a16z deleted the sagar/hardening branch March 31, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants