Skip to content

Kaden zipfel feature/gas griefing#222

Merged
maurelian merged 10 commits intomasterfrom
KadenZipfel-feature/gas-griefing
Dec 17, 2019
Merged

Kaden zipfel feature/gas griefing#222
maurelian merged 10 commits intomasterfrom
KadenZipfel-feature/gas-griefing

Conversation

@muellerberndt
Copy link
Copy Markdown
Collaborator

@muellerberndt muellerberndt commented Dec 12, 2019

CWE reference added.

@thec00n
Copy link
Copy Markdown
Collaborator

thec00n commented Dec 12, 2019

Shall we assign SWC id 126 to this one and finally close the gap?

Copy link
Copy Markdown
Contributor

@maurelian maurelian left a comment

Choose a reason for hiding this comment

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

LGTM.

transactions[transactionId].executed = true;
transactionId += 1;

Target target = new Target();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why deploy a new target everytime?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good point. The problem that I'm looking at is, would I have to deploy the Target contract to the mainnet and reference the address to avoid compilation errors? Or is there some way I can circumvent the compilation error?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

oh, you can probably just delete that line, and do this:

function relay(Target target, bytes memory _data, uint _gasLimit) public {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ahh, yes of course

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixed in #223

Copy link
Copy Markdown
Contributor

@maurelian maurelian left a comment

Choose a reason for hiding this comment

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

Actually... I have a doubt, but don't have time to look into it now.

Basically, I think the protection should be in Relayer, not Target.

@@ -0,0 +1,19 @@
# Title
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please rename the file to SWC-126 per #215.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixed in #223

@thec00n
Copy link
Copy Markdown
Collaborator

thec00n commented Dec 17, 2019

@kadenzipfel @maurelian can we get this PR merged?

@maurelian maurelian merged commit f95aff8 into master Dec 17, 2019
@maurelian maurelian mentioned this pull request Dec 17, 2019
thec00n pushed a commit that referenced this pull request Dec 18, 2019
* Add details to requirement_simple bytecode locations

* Tweak location info for SWC-128

* misformatted bytecode offsets

* Update README.md

Updating links and some minor textual changes.

* Slightly more descriptive error

* Print full error

* Clarify scope (#220)

* Kaden zipfel feature/gas griefing (#222)

* Insufficient gas griefing

* Add newlines

* Fix improper newlines

* Make changes to relayer contracts

* Add CWE reference

* Fix link

* Rename to SWC-126

* No target redeploy

* Fix compiler warnings

* Update SWC definition [ci skip]
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