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: set_token_standard() has update_authority unneccessarily set to mutable #1133

Conversation

billythedummy
Copy link
Contributor

This results in writable privilege escalation for e.g. when CPI-ing SetTokenStandard using anchor_spl with an immutable update_authority AccountInfo

@billythedummy billythedummy requested a review from a team as a code owner June 28, 2023 03:29
@billythedummy billythedummy requested review from blockiosaurus and svc01-metaplex and removed request for a team June 28, 2023 03:29
@samuelvanderwaal samuelvanderwaal requested review from samuelvanderwaal and removed request for svc01-metaplex June 28, 2023 16:39
@samuelvanderwaal
Copy link
Contributor

Thanks for the fix! You also need to remove the writable annotation from SetTokenStandard's update_authority account in src/instruction/mod.rs so the autogenerated JS lib also has this change. After that run yarn api:gen in the JS directory and push and then it should be good to be merged.

@billythedummy
Copy link
Contributor Author

Thanks for the fix! You also need to remove the writable annotation from SetTokenStandard's update_authority account in src/instruction/mod.rs so the autogenerated JS lib also has this change. After that run yarn api:gen in the JS directory and push and then it should be good to be merged.

done

Copy link
Contributor

@blockiosaurus blockiosaurus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you for catching this!

Copy link
Contributor

@danenbm danenbm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@samuelvanderwaal samuelvanderwaal merged commit d6f96f6 into metaplex-foundation:master Jun 30, 2023
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.

4 participants