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

Bugfix in signature validations marketplace #1320

Merged
merged 4 commits into from
Jun 6, 2024

Conversation

bitbeckers
Copy link
Contributor

This PR covers the bug discussed in #1317

When a user has set the approvals on the marketplace, an attacker could submit a transaction signed by the attacker for the (partial) sale of a hypercert fraction. The attacker would receive the funds, the order taker would receive the fraction and the fraction owner would lose a bit of the fraction.

To mitigate this, we added checks on the hypercert strategies where needed. Specifically, a check on ownership of the fraction by the signer of the message by calling the HyperMinter contract at time of order execution.

The vulnerability is specific to the split function call because there is not check there on the operator-msg.sender relations/approval as common in the transferFrom methods. This is an artifact from changing the original design where only the owner or somebody allowed by the owner would be able to split. The marketplace widens the attack vector because anybody can operate the marketplace, compared to a trusted operator you specifically set the approval for.

To validate the changes, tests have been added to each hypercert strategy and one on the protocol level for 721 as a sanity check.

@bitbeckers bitbeckers added the p0:urgent Must address immediately label May 24, 2024
@bitbeckers bitbeckers requested a review from Jipperism May 24, 2024 14:05
@bitbeckers bitbeckers self-assigned this May 24, 2024
Copy link
Contributor

@Jipperism Jipperism left a comment

Choose a reason for hiding this comment

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

Had a look and as far as I can tell this is what we discussed.

@bitbeckers bitbeckers merged commit f6a3c81 into develop Jun 6, 2024
1 check passed
@bitbeckers bitbeckers deleted the fix/marketplace_signature_checks branch June 11, 2024 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p0:urgent Must address immediately
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants