Reject unknown syscalls and `sol_alloc_free_`
- Idea
- Draft
- Review
- Accept
- Implement
- Active
Decision brief
Why this proposal matters
Reject unknown syscalls as well as sol_alloc_free_ for new deployments. Additionally, increase the CU cost of sol_alloc_free_ to further discourage any remaining use.
Proposal at a glance
What changes
- sBPFv3 (or later) programs containing a call instruction to sol_alloc_free_ (i.e. CALL_IMM 0x83F00E8F) or an unknown syscall MUST be rejected the same way as any other invalid program upon deployment or upgrade.
- Reject unknown syscalls as well as sol_alloc_free_ for new deployments. Additionally, increase the CU cost of sol_alloc_free_ to further discourage any remaining use.
Stakeholder map
Who is affected
Builders & client teams Medium impact
This change is expected to be effectively transparent to most users. The syscall was disabled for the past 4 years and was only recently re-enabled. In the corpus of programs deployed on mainnet there are no SBPFv3 programs that reference this syscall.…
Action requirement unknownValidators & operators Medium impact
sBPFv3 (or later) programs containing a call instruction to sol_alloc_free_ (i.e. CALL_IMM 0x83F00E8F) or an unknown syscall MUST be rejected the same way as any other invalid program upon deployment or upgrade.
Action may be requiredUsers & stakers Medium impact
This change is expected to be effectively transparent to most users. The syscall was disabled for the past 4 years and was only recently re-enabled. In the corpus of programs deployed on mainnet there are no SBPFv3 programs that reference this syscall.…
Action requirement unknownGovernance & ecosystem Impact unknown
No proposal-specific evidence was found for this group.
Action requirement unknownExact source revision
Full proposal document
1974773ff227Summary
Reject unknown syscalls as well as sol_alloc_free_ for new deployments.
Additionally, increase the CU cost of sol_alloc_free_ to further discourage
any remaining use.
Motivation
This feature is meant to address an oversight. Any program referencing
sol_alloc_free_ was rejected at deployment since 2022. However, with a switch
to static syscalls, this filter is no longer effective and programs invoking
the sol_alloc_free_ syscall may be deployed again.
Modern programs bring their own allocator, making this syscall a distraction to everyone involved.
Related SIMDs
This proposal is related to the following previously accepted proposal:
- SIMD-0178: SBPF Static Syscalls which exposed the defect in the implementation.
Detailed Design
sBPFv3 (or later) programs containing a call instruction to sol_alloc_free_
(i.e. CALL_IMM 0x83F00E8F) or an unknown syscall MUST be rejected the same way
as any other invalid program upon deployment or upgrade.
Any preexisting programs that invoke the sol_alloc_free_ syscall now have to
pay an additional syscall_base_cost CUs for each invocation of this syscall
to encourage programs to migrate away from this syscall and use their own
allocators.
Impact
This change is expected to be effectively transparent to most users. The
syscall was disabled for the past 4 years and was only recently re-enabled. In
the corpus of programs deployed on mainnet there are no SBPFv3 programs that
reference this syscall. Out of 209 <=v2 programs that may call the
sol_alloc_free_ syscall, only one is used heavily:
Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo. Only three other
programs (1, 2, 3) had any use in the past month, all of
which are upgradeable. The remainder had no use within the past 3 months.
Memo program's syscall usage scales with the number of accounts specified
in the instruction to the order of $$4n+2, n ≥ 1$$. A sampling of recent
transactions shows that 75% of instructions specify no accounts and the CU
count remains unchanged. The remainder pass in 1 account, increasing the CU use
for those instructions by 600.
The 4n+2 syscall calls come from the SDK's entrypoint rather than program
code itself, so a similar effect can be anticipated for all 209 programs.
Conformance
A test that attempts to deploy a SBPFv3 program invoking the sol_alloc_free_
syscall should suffice. It could be a conformance test suite fixture.
Alternatives Considered
Remove the syscall altogether – would break 209 programs, a couple of which are still being actively used.
Charge CU only when free_addr == 0 (allocations,) or a smaller amount per
call.
Security Considerations
None
New Terminology
None
Evidence graph
Related proposals and rollout
One or more sources are unavailable.
Upstream review record
Upstream discussion & review
One or more sources are unavailable.
Provenance
Evidence & technical details
Rollout or chain data, source revisions, freshness and integrity. 3
Provenance
Evidence & technical details
Rollout or chain data, source revisions, freshness and integrity.SIMD
Deployment Status
Feature Gate not yet created
Exact source revision
Sources & integrity
- Proposal document pinned_commit_blob
1974773ff2279699b534e41934248c40a1413bfa - simd-document document · stale · Dec 4, 2026
1974773ff2279699b534e41934248c40a1413bfa
One or more sources are unavailable.
One or more sources are unavailable.
simd.watch community discussion · SIMD-0706
Powered by Giscus · Sign in with GitHub to comment
Community comments load when this section approaches the viewport.