Skip to content
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

fix: validate system accounts #20

Merged
merged 5 commits into from
Oct 4, 2024
Merged

fix: validate system accounts #20

merged 5 commits into from
Oct 4, 2024

Conversation

wei3erHase
Copy link
Member

@wei3erHase wei3erHase commented Oct 4, 2024

Fixes HAL-003

Description

In order to participate in a token locking process, a user needs to first invoke the process_init entry point.

This entry point will create an account with the necessary size to store the information provided in the next step of the process, process_create .

The current version of this program is not checking that the provided System Program and Rent Sysvar accounts corresponds to the correct accounts, provided by the Solana Rust SDK.

Although there was not risk identified due to this lack of restrictions, it is a good practice to implement this validations to prevent any unexpected attack vector that might appear later.

@wei3erHase wei3erHase merged commit 7e7cde4 into dev Oct 4, 2024
1 of 2 checks passed
@wei3erHase wei3erHase deleted the fix/validate-accounts branch October 4, 2024 20:56
@wei3erHase wei3erHase mentioned this pull request Oct 4, 2024
7 tasks
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.

1 participant