Skip to content

Withdrawal of SIMD-0163 #308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions proposals/0163-lift-cpi-caller-restriction.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors:
- Alexander Meißner
category: Standard
type: Core
status: Implemented
status: Withdrawn
created: 2024-07-16
feature: HcW8ZjBezYYgvcbxNJwqv1t484Y2556qJsfNDWvJGZRH
---
Expand Down Expand Up @@ -70,7 +70,7 @@ None.

## Impact

See motivation.
See motivation and security considerations.

Dapp developers who wish to benefit from the lifting of the restriction shall:

Expand All @@ -86,7 +86,20 @@ transaction is explicitly left unspecified.

## Security Considerations

None.
For a program to be allowed to modify an account it must be the owner and the
instruction account must have been passed in with the `is_writable` flag set.
Some programs take custody of an accounts ownership and allow control via a
signer authority. In these cases the instruction account must have been passed
in with the `is_signer` flag set additionally. Both these flags can only be set
in the inner most nested CPI if all parent CPIs did also set them. However,
they can not be controlled at per top-level-instruction. All of these
instructions share the same flags throughout the transaction.

This means the CPI caller restriction has been used as a security feature to
prevent a top-level-instruction from calling into a program which has custody
of an account that another top-level-instruction required as a signer. Removing
this restriction would require a lot more care to be taken in transaction
builing to prevent the relaxation from being exploited.

## Backwards Compatibility

Expand Down
Loading