Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Internalize setRoyaltyPolicy call into LicenseRegistry #65

Merged
merged 2 commits into from
Feb 4, 2024

Conversation

jdubpark
Copy link
Contributor

@jdubpark jdubpark commented Feb 3, 2024

Currently, the Policy Framework Managers (PFMs) are in charge of calling setRoyaltyPolicy (RoyaltyModule) on license linking to parents, triggered by verifyLink in LicenseRegistry's linkIpToParents. The Royalty Module restricts the caller to the IPAccount owner OR registered PFMs.

This opens up a huge vulnerability issue. Any PFMs can set royalty plicy on any IPAccounts. Since setting a royalty policy is an irreversible, one-time action per IPAccount, a malicious PFM can set royalty policy on random IPAccounts, thus preventing actual royalty policy registrations.

A proposed solution is whitelisting PFMs. Even with this solution, any whitelisted PFM can maliciously or accidentally call setRoyaltyPolicy on any IPAccounts.

A better, working solution is to call setRoyaltyPolicy from the LicenseRegistry, after verifying links and checking the compatibility of parent licenses in linkIpToParents.

Copy link
Contributor

@Ramarti Ramarti left a comment

Choose a reason for hiding this comment

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

LGTM

@jdubpark jdubpark merged commit 8ee07ea into storyprotocol:main Feb 4, 2024
1 check failed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants