Closed dereksilva closed 4 years ago
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
This issue now has a funding of 1.007 ETH (113.94 USD @ $113.15/ETH) attached to it as part of the Bloom Protocol fund.
Hi, I have taken a quick look and the smart contract TokenEscrowMarketplace.sol uses hashes of signature data to disqualify signatures unfortunately this leaves the contract vulnerable to transaction malleability attacks. The SWC Registry covers this issue here. Long story short, given a signature (r,s,v) of hash the signature (-r mod n, s, v) is also a valid signature of hash and its calculation does not require the private key. This modified signature has a different hash so your current usedSignature map will not prevent the reuse of the signature. All signatures can be used twice in TokenEscrowMarketplace.sol in its current format. Here's a link to a proof of concept contract showing signature malleability in action.
@pvienhage wow great catch! perhaps we should 'burn' or 'invalidate' signatures by invalidating a combination of sender address and nonce instead of signature.
see relevant code in SigningLogic.sol on a new branch here https://github.com/hellobloom/core/blob/trustlessContracts/contracts/SigningLogic.sol
Hi @ipatka, yes the best practice is too use data about the transaction instead of the data in the signature. I have read the code you updated and I think that it fixes the issue with signature malleability. Normally I use stored nonces for each address but the formulation where the user signs the nonce they want to use also works.
ok great. I'm tweaking a couple things to make sure the new system won't be vulnerable to front-running issues where someone can 'burn' the signature contents before a TX is mined. but the overall architecture will stay the same as the most recent code you reviewed
Hey, if I have a security concern about contract logic, (not necessarily a bug) where should I be raising those types of issues/do those fall under the bug bounty if my concerns are deemed valid?
@andy8052 yes that would fall under this bounty
we'll keep funding this issue and paying out bounties for multiple submissions. not just limited to one submission
I haven't noticed from my reading but, is there any way for a user to handle a compromised linked address in AccountRegistryLogic.sol
if they have lost the private key (ie. their phone was stolen)?
Previously we had it so any linked address could unlink any other linked address. But I think it’s safer to only let addresses unlink themselves. If you lose a linked key and want to unlink it from your other addresses you would have to individually unlink each address from the lost address then relink the remaining keys back together. This would be tedious if you have many linked addresses but people will likely have at most 2-3. It could also be combined into a single TX by writing another smart contract to submit these link/ unlink signatures in batches
If you have attestations that reference the lost address you’ll have to redo those attestations. If the key really was compromised, not just lost you should request the attester to revoke the attestations
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work has been started.
These users each claimed they can complete the work by 1 week, 6 days ago. Please review their action plans below:
1) pvienhage has started work.
I'm opening this for the transaction malleability bug I pointed out
Learn more on the Gitcoin Issue Details page.
Hi @ipatka Could you please provide a price offer for each bug/vulnerability with their respective severity ? Also fund your work in gitcoin, because for 1ETH I am afraid you will have a 100$ worth review.
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work for 1.007 ETH (106.82 USD @ $106.08/ETH) has been submitted by:
@dereksilva please take a look at the submitted work:
@catageek Yes good point. @dereksilva will post our rubric based on severity and impact
@pvienhage We are going to pay out a healthy amount of ETH for the bug you found. I'm having trouble adding more funds to the Gitcoin issue, but as soon as I do they will be sent your way.
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
The funding of 1.007 ETH (118.11 USD @ $117.29/ETH) attached to this issue has been approved & issued to @pvienhage.
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
This issue now has a funding of 5.0 ETH (586.44 USD @ $117.29/ETH) attached to it as part of the Bloom Protocol fund.
Hi @dereksilva, thanks for the kudos and for the bounty fulfillment! Let me know if there is anything else you need me to do.
@catageek We have added guidelines to the issue to provide clarity on how much ETH could be paid out, up to 5 ETH for high severity/high impact issues. We started a new Gitcoin issue at https://gitcoin.co/issue/hellobloom/core/35/1870 for this.
@pvienhage You're welcome! I'll be paying out additional ETH in a few minutes to you for the high/high bug you discovered.
Issue Status: 1. Open 2. Cancelled
The funding of 5.0 ETH (600.67 USD @ $120.13/ETH) attached to this issue has been cancelled by the bounty submitter
⚡️ A tip worth 4.00000 ETH (480.54 USD @ $120.13/ETH) has been granted to @pvienhage for this issue from @dereksilva. ⚡️
Nice work @pvienhage! Your tip has automatically been deposited in the ETH address we have on file.
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
This issue now has a funding of 1.0 ETH (120.13 USD @ $120.13/ETH) attached to it as part of the Bloom Protocol fund.
This is good advice for https://github.com/hellobloom/core/tree/master/contracts.
Check for Integer overflow. One such case is this. It is better to have a SafeMath library like the linked project.
Finish all state changes first to avoid reentrancy attack. Check this. Found many cases.
I am unable to register via Gitcoin right now. Will register soon.
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
The funding of this issue was increased to 3.0 ETH (341.23 USD @ $113.74/ETH) .
@dereksilva Can you update me on my submission? I understand you guys are busy.
@srisankethu Thanks for reviewing the contracts
Issue 1: Can you clarify which contracts would be affected by assuming they are initialized with a zero balance?
Issue 2 & 3: The contract you referenced is not in scope of this bounty. That Metacoin contract is just dead code that we should remove from the repo. Thanks for pointing it out. The scope fo the bounty is the contracts referenced in the readme: https://github.com/hellobloom/core#contract-summaries
Issue 4: Where did you identify code that could be vulnerable to reentrancy attacks? Can you link to a specific example?
@ipatka With Issue 1 and Issue 4, I made a general suggestion. I will look into it where it is affecting. Issue 1 affects where contract is created(in the case where attack has pre-created the contract with the same address with a non-zero balance). I was to the point with Issues 2&3, but did not know they were out of scope. It wasn't mentioned that they were out of scope earlier!?
I will deep dive and look into the contracts thoroughly :+1:
Just wanted to know, IS this bounty still open?
require(!isManager(_manager), "Address is currently a manager");
check to see if the owner is adding a new manager who is already a manager? here @ipatka It would avoid calling again and again. EDIT: Noticed it is out of scope for this bounty.require(_initializer != address(0));
. Specifically for public
functions.@aj07 Yes, it's still open!
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work for 3.0 ETH (336.16 USD @ $112.05/ETH) has been submitted by:
@dereksilva please take a look at the submitted work:
@srisankethu
@ipatka
No because that check can be done off chain prior to sending the transaction. On chain input validation should only prevent malicious activity or undesirable state changes.
Are you suggesting there is a reentrancy vulnerability due to emitting an event after a token transfer?
I don’t see how the link you posted is relevant. What does the eth balance have to do with this contract’s logic?
@ipatka can you update me on my comment. Thank you!
@srisankethu These are not bugs or vulnerabilities so we will not grant an award for this submission. Thank you for your detailed review! The bounty is still open so feel free to continue pointing out any potential issues and I would be happy to discuss them here
@ipatka Thanks for the update. I will 'Stop work' on gitcoin.
⚡️ A tip worth 0.10000 ETH (8.44 USD @ $84.39/ETH) has been granted to @vikaskyadav for this issue from @dereksilva. ⚡️
Nice work @vikaskyadav! Your tip has automatically been deposited in the ETH address we have on file.
Is Bounty still open?
Yes we’re still accepting submissions for this bounty
MiniMeToken.sol and MiniMeVestedToken.sol are of version Version ^0.4.6 & Version ^0.4.15, so the structure is different from other contracts, they don't have Visibility and Getters defined and many more versioning difference, is this okay?
Yes those contracts are only used by the BLT token so we are not actively updating that code. They are not in the scope of this bounty. The scope fo the bounty is the contracts referenced in the readme: https://github.com/hellobloom/core#contract-summaries
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work has been started.
These users each claimed they can complete the work by 1 month, 2 weeks ago. Please review their action plans below:
1) markusj1201 has started work.
Learn more on the Gitcoin Issue Details page.
hey, is this bounty still open?
@gorlitzer Yes, it is!
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
This Bounty has been completed.
Additional Tips for this Bounty:
Review the smart contracts and tests in this repository. Identify and propose a fix for a bug. Submissions will be reviewed by the Bloom team and rewards will be issued according to the severity. Here are some examples:
on
functions. Check to make sure anything public cannot be abused.onlyDuringInitialization
.Here is our bug bounty payment rubric/guideline: