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

[Zoe] Fix bug in which offer safety can be violated #1115

Merged
merged 4 commits into from
May 15, 2020
Merged

Conversation

Chris-Hibbert
Copy link
Contributor

@Chris-Hibbert Chris-Hibbert commented May 15, 2020

The bug was introduced in filter proposal give and want by sparseKeywords

It allows a grifter contract (demonstrated here) to slip assets away from a victim one keyword at a time. The victim is left with neither their give or their want.

The solution is to reinstate the insistance that offer safety be checked against all keywords. We provide the feature that #1076 was aiming for by allowing reallocations that don't impact keywords in an offer's proposal.

@Chris-Hibbert Chris-Hibbert force-pushed the grifter branch 2 times, most recently from eb7dd0a to f482fed Compare May 15, 2020 19:43
Chris-Hibbert and others added 4 commits May 15, 2020 16:40
The bug was introduced in "filter proposal give and want by sparseKeywords"
#1076.
It allows a grifter contract (demonstrated here) to slip assets away
from a victim one keyword at a time. The victim is left with neither
their give or their want.

The solution in facets is to reinstate the insistance that offer
safety be checked against all keywords. We provide the feature
that #1076 was aiming for by allowing reallocations that don't impact
keywords in an offer's proposal.
The fix is to insist that all offers retain offer safety across all
keywords. The desired ability to rearrange values outside of the
offer's keywords can be satisfied by explicitly allowing
rearrangements that don't impact any of the proposal's keywords.

This commit includes the bug fix but not a test that demonstrates the
vulnerability.
@katelynsills katelynsills changed the title test: demonstrate an attack by a zoe contract to be fixed in facets [Zoe] Fix bug in which offer safety can be violated May 15, 2020
@katelynsills katelynsills merged commit 39d6ae2 into master May 15, 2020
@katelynsills katelynsills deleted the grifter branch May 15, 2020 23:58
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.

2 participants